Using “mailto:” for the basic email link
An email link is simply one that upon clicking it will open the user’s email client of choice and add the email address to a new blank email, simple! It uses the code: “mailto:” before the email address, and it looks like this:
So the outcome would be: Email iopan
(Click this link to see how your email client will open)
Using “?subject=” to add a subject to the email link
Have you ever wondered how an email link – once clicked on – can open your email client and write the SUBJECT and some BODY text automatically? It’s simply a matter of adding some extra code to the link, after the email address. So by adding the code: “?subject=” after the email address, the subject will be written also. Here’s what it looks like:
The outcome is now: Email iopan
(Click this link to see how the subject will be written)
Notice, that instead of a space, we have to add the code %20 – this is because the a href attribute will not accept empty spaces. There are other characters that need to be written in code, and you can see them in the table below.
|Character Name||Character Symbol||CODE|
|A single carriage return (line break)||%0D|
|Single inverted comma||‘||%27|
Using “&body=” to add body text to the email link
As you may have guessed, adding the body text is now a straight-forward matter of adding the code: “&body=” after the email subject, and writing the copy, remembering to use “%20” for your spaces, and other special character codes.
So – for example – I would like my body text to read:
This is a great blog post! Would you please subscribe me to your blog?
In the HTML code, this would be written as:
Outwardly, the outcome appears the same: Email iopan
(Click this link to see how the body text will also be written)
Other parts of the email link that you can alter
You can also set an email’s CC and BCC recipients*, by using “&cc=” and “&bcc=” respectively.
*These abbreviations stand for “Carbon Copy” and “Blind Carbon Copy” – If you are sending a straightforward copy then cc will suffice, BUT, if you are sending a copy and you don’t wish the other recipients to see that you sent it to this contact, use bcc.