How to hide an email address from address robots

 [ HOME ]

If you grew up in the UK during WWII, as I did, then you occasionally have a craving for Spam, that mysterious meat product in the key-operated can. I'll bet, though, that you don't care for the other variety: "email spam". Where does it all come from, and how does your email address get picked up by these spammers? Simple: these folks send out "harvester robots" that trawl the web looking for the "@" sign. When they find one, the robots know that it's probably in the centre on an email address, and so they are programmed to copy the text string sitting in front of and behind the sign. Bingo; your address is now part of a spammer's collection and it will be sold within the day.

The more frequently your email address is "exposed" on a web site, the greater the liklihood that it will be harvested.
 
What to do?
Use a simple JavaScript "cloaking" script. Now, don't worry if you have never edited a script before; this is a 1-2-3 operation.
 
Here's the base script:
<script type="text/javascript">
user ="name"
domain ="domain.com"
subCon ="Text to appear as message subject"
document.write('<a href="mailto:' + user + '@' + domain +'?subject=' +subCon+' " ' +' >Text to appear on your web page</a>');
</script>
 
Place this snippet of code directly into your HTML, at the point where you want the email link to appear.

If your email address is cpsmember@yoursquadron.com, then you would replace "name" with "cpsmember" and "domain.com" with "yoursquadron.com"

The next line of code (subCon =) enables you to enter the text that you wish to have appear in the subject line of the message. For instance, you could insert: "Comment from the XXX Squadron Website"

The next line is where you decide what the link should say. If you want it to display "Contact Us" you would just type that in place of "Text to appear on page"

This is how the script works for . Click on that link and your email client should open up with a message addressed to me and with the subject line already inserted. Neat, don't you think? OK - go ahead, send me a note!

No matter what you set for the display, the email address will never show itself to spam harvesters.

 

Updated by TC 2006-11-24  [ HOME ]