<A href=mailto: email@example.com>eMail Me!</a>
Unfortunately, spammers were able to develop "bots" that "spider" the web - that is, go through all the HTML code they can in order to find email addresses. When they find one, it goes onto a list that gets sent spam and also worse forms of junk email.
A Sample Code Snippet
// This script goes where you want the email link:
//The script uses the following variables
var emailPrefix = "Email Username"; //the first part of the email address
This may seem like a lot of effort to go through for one email link - and it's true, it is, or it would be except for the magic of cut and paste. More importantly, though, it protects email addresses from being scooped up.
A Quick and Dirty Way to Fool Spambots
The code above is great for a robust mail link - complete with subjects, body text, etc. But the main focus of it is that it breaks up the email address, which fools the spambots.
On the coding website December14.net, there is a similar method used in a much more elegant code snippet:
|Click to send an <a href="mail.html" onmouseover="this.href='mai' + 'lto:' + 'name' + '@' + 'thisDomain.com'">e-mail message</a>|