HTML Tips and Techniques
Using MAILTO Properly
The MAILTO command is a pretty common one in HTML - and also one that is often used poorly. What is MAILTO for, and how is it best used?
First, the basic syntax. To create a link on your page that tells the user's mail system to start a message off, you would use:
<A HREF="mailto:firstname.lastname@example.org">Mail the Webmaster</A>
Note that there aren't any slashes (//) in this. Simply put in the email address and what you want the text to read. A new message box will be popped up at the user's machine, letting them use their normal mail package to send you a message. Your email address is filled in automatically.
The most common error that designers make when putting in mailto links is to put the actual email address as the thing to click on. This is bad for two reasons. First, the user is usually scanning for someone to contact. While words like "Contact Support for Help" or "Customer Service Email" are meaningful, just an email address is harder for the visitor to scan and find.
Also, and perhaps the most important reason, SPAM-bots crawl the entire web daily looking for easy access to email addresses to add to their SPAM lists. If your email address is visible on the page as text like that, it immediately becomes fodder for their SPAM lists and you will start to get literally hundreds if not thousands of messages a day!
If you want to be even more organized with your mailto, you can even specify what subject it will be sent with, and a carbon copy (CC) on the mail. You would do this with:
<A HREF="mailto:email@example.comfirstname.lastname@example.org&subject=feedback">Mail the Webmaster</A>
That helps ensure that everybody who needs to sees the message, and that the subject helps you sort through your incoming mail.
Lisa's HTML Tips and Techniques Homepage
Other Sites by Lisa
ASP Code & Help Java Code & Help Gaming Walkthroughs