If you have a contact page in your website and want to include mailto: addresses, you're inviting email spam harvesters to steal your address by including them in the HTML source. I found this out first hand a few years ago with chris@sloppycode.net (it doesn't exist anymore so that address will throw back errors). Whenever I activate the address now, I get around 100+ emails a day offering watches, erections, "sweep her off her feet when you flop out your super dick!" and so on.A large majority of these are swallowed up by sophisticated anti-spam filters most mail servers now have, but it's still better to get none at all than some.
The obvious way around giving out the address is to encode the mailto somehow. The Javascript below is extremely simple and I don't pretend that it is doing anything clever. It does a simple Rot N or Caesar Cipher on the mailto link so that an email harvester which will be looking for a @ and a . won't find one in your source. It could be changed to include DES/DES3 or similar asynchronous encryption or maybe just base64'd. My opinion was this is overkill as most harvesters are not going to be intelligent enough to dicipher even the most basic 2-way encryption.The Javascript makes use of the Javascript equivalent of CHR() and ASC() functions - String.fromCharCode() is CHR()"m".charCodeAt(0) is ASC().All you need to do is include the Javascript decode function in your HEAD, and then use href="javascript:decode.." mce_href="javascript:decode.." exactly as the prompt box below shows you.If you are particularly paranoid about losing your emails, you can change the function name and variable shift to make sure a bot which looks for the javascript function doesn't find it. It hasn't been tested with unicode beyond a few á and é examples.
Instructions
1) Use the encode facility below to encode your mailto address.2) Change your href="mailto:" link to href="javascript:decode..." as the prompt box says.3) Include the Javascript function below in your 4) The encode script is available to download above.