Main menu: custom link - MailTo Main menu: custom link - MailTo
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Main menu: custom link - MailTo

Started by bvu007, March 28, 2007, 02:41:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bvu007

Hi,
I'add a custom menu entry and set the url to mailto: to open the default mail client to compose an email.
Now I' like to set the subject of the new mail to a default value.
Anyone has any idea how to modify the mailto-statement?

Thanks
Bodo

Joachim Müller

This is plain HTML and not related to Coppermine at all. You could have found out easily by googling for it. This is not a generic HTML support board. As you appear to be German, your first visit on HTML-related questions should always be selfHTML - in this special case, read http://de.selfhtml.org/navigation/html.htm#verweise

Use this syntax:
<a href="mailto:you@yourdomain.tld">click me</a>
<a href="mailto:you@yourdomain.tld?subject=your%20custom%20subject">click me</a>
<a href="mailto:you@yourdomain.tld?cc=name2@example.net">click me</a>
<a href="mailto:you@yourdomain.tld?bcc=name2@example.net">click me</a>
<a href="mailto:you@yourdomain.tld?body=some%20default%20text">click me</a>
You can combine them as well, leading to links like this<a href="mailto:you@yourdomain.tld?subject=your%20custom%20subject&amp;cc=name2@example.net">click me</a>As you can see in my examples, you'll have to use the URI-save alternatives for special chars. A space is being represented by %20

However, it is not recommended at all to use this technique - it is not bright in terms of email harvesters just waiting for such tags. It's not bright as well for people who haven't configured an email client. Mailto links look extremely newbish imo. I suggest using a contact form instead, see Contact us mail form plugin with image verification for Coppermine Photo Gallery

bvu007

GauGau, thanks for your sugestion!
No I plugin the contact_us email form and it works great.

Regards
Bodo