If the value of the
href-attribute begins with
mailto: it will try to open an email client on click:
<a href="mailto:firstname.lastname@example.org">Send email</a>
This will put the email address
email@example.com as the recipient for the newly created email.
Cc and Bcc
You can also add addresses for cc- or bcc-recipients using the following syntax:
<a href="mailto:firstname.lastname@example.orgemail@example.comfirstname.lastname@example.org">Send email</a>
Subject and body text
You can populate the subject and body for the new email as well:
<a href="mailto:email@example.com?subject=Example+subject&body=Message+text">Send email</a>
Those values must be URL encoded.
Clicking on a link with
mailto: will try to open the default email client specified by your operating system or it will ask you to choose what client you want to use. Not all options specified after the recipient's address are supported in all email clients.