Guest Author - Elizabeth Connick
A 'mailto' is a specialized link that you can use to automatically open an email message window on your visitors' computers when they click on the link. It can be a great alternative to setting up a contact form, and is often used to handle mailing lists; in fact, you can use mailto links any time you want to communicate directly with your visitors.
The basic mailto link is designed like this:
<a href="mailto:firstname.lastname@example.org">Email the webmaster</a>
Pretty simple stuff! When a visitor clicks on a link, their computer will open up a New Message window from their primary email program. It won't use a browser-based email program like the AOL or Gmail web interfaces, only email client programs like Outlook and Thunderbird. Note that there is no space between the "mailto:" and the email address; putting a space after the colon will break the link.
Now that you've got the basics down, let's look at customizing the mailto link. Assume that you are building a list of visitors who want to receive your monthly newsletter, and you want to be sure that newsletter signups are very clear. You can use the mailto link to specify the subject line of that new message window, as follows:
<a href="mailto:email@example.com?subject=Sign%20me%20up">Sign up for the monthly newsletter</a>
Now when the New Message window pops up, it will have the subject line pre-populated. The "%20" inserted in the subject line tells the email program to add a space between the words. Most email programs will understand if you simply use spaces in between the words, but to be on the safe side it's best to use the hex code command.
How else can you be sure to get those newsletter signups quickly? Well, you could have the mailto link send a copy of the message to your other email address, in case you don't check your webmaster address regularly. Here's how to add a cc field to that mailto link:
&firstname.lastname@example.org">Sign up for the monthly newsletter</a>
You can even put multiple addresses in the cc field, by separating each recipient with commas.
Finally, let's say you also want to add specific text to the body of the email, just to make absolutely sure that you know it is a newsletter subscription. You can insert body text with the following code:
%20newsletter.">Sign up for the monthly newsletter</a>
Again, "%20" is hex code for a space; if you want to put a line break in the body, use "%0D."
See the above example by clicking here