Adverts
While more than a little be clunky the mailto link can still be useful sometimes. The problem with mailto is that it is necessary to spam harden the email address that is being used. Generally speaking there are better ways to get your customers to contact you (such as a form) but if simply nothing else will do here is a guide to using the mailto functionality. Many people don't realize that mailto can actually do a lot more than send an email to one person. It is possible to specify multiple recipients and set a subject and body content.
Note: I've had to break some of the examples onto multiple lines. Each should be on a single line. I have split them such that it should make a difference when they are used.
The simplest usage is:
<a href="mailto:foo@example.com">Mail Foo</a>
Which opens a blank email to foo@example.com. If you want to include someone else in the mail it can be done like this:
<a href="mailto:foo@example.com,bar@example.com">Mail Foo and Bar</a>
To add a subject and body do this:
<a href="mailto:foo@example.com?subject=Subject
&body=body line 1">Mail Foo</a>
If you also wanted to cc in someone else to the above message you would do it like this (bcc is the same):
<a href="mailto:foo@example.com?cc=bar@example.com
&subject=Subject&body=body line 1">Mail Foo</a>
Finally if you want to include a multi-line body you need to escape new line characters with %0A (percent zero A) or  as shown here:
<a href="mailto:foo@example.com?cc=bar@example.com
&subject=Subject&body=body line 1%0Abody line 2">Mail Foo</a>