How To Set Up a Mailto Link
The basic mailto link is designed like this:
<a href="mailto:email@example.com">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:firstname.lastname@example.org?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:
&email@example.com">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
This site needs an editor - click to learn more!
Editor's Picks Articles
Top Ten Articles
Content copyright © 2019 by Elizabeth Connick. All rights reserved.
This content was written by Elizabeth Connick. If you wish to use this content in any manner, you need written permission. Contact BellaOnline Administration for details.