For what ever reason I seem to always forget the HTML code to add a subject line to the MAILTO code so here it is and a few other things you can add also.
The HTML MAILTO link looks like this:
<a href=”mailto:emailaddress@yourdomainname.com”>Email Us</a>
It will display on your web Site like this:
The MAILTO link can do so much more. You can have add a subject line, send copies to multiple recipients and more.
1. Add a Subject Line
You can select what the subject line in the email well be by adding ?subject= after the email address.
The link now becomes:
<a href=”mailto:emailaddress@domainname.com?subject=”this will appear in the subject line“>Email Us</a>
You can see the effect of that if you click here.
2. Send to Multiple Recipients
Mail can be sent to additional recipients either as carbon copies (cc) or blind carbon copies (bcc).
This is done in a similar way, by placing ‘?cc=anotherperson@yourdomain.com‘ after the initial address.
So the link looks like this:
<a href=”mailto:someone@yoursite.com?cc=someoneelse@theirsite.com”>Email Us</a>
cc can simply be replaced by bcc if you wish to send blind carbon copies.
This can be very useful if you have links on pages with different subjects. You might have the email on each page go to the appropriate person in a company but with a copy of all mails sent to a central address also.
You can of course specify more than one additional recipient, just separate your list of recipients with a comma.
<a href=”mailto:emailaddress@yourdomain.com?cc=