Ok, so I find every time I put a mailto: link in my website, spam bots go mental and start filling up my inbox with rubbish. We have to be sly and cunning like a fox (a programming fox) to out-wit the spammers.
I found a link here that helps you encode your email addresses as numerical characters:
http://www.wbwip.com/wbw/emailencoder.htmlIt encodes a normal email like info@mysite.com to a mess of characters like this: "info@mysite.com"
This character string is translated back by browsers into text, but some spam-bots won't be clever enough to do the same.
For those spam bots that are pretty smart, we can use javascript to obfusticate the email address like this:
yourname@yourdomain.com
This uses a bit of javascript to mangle the mailto: bit of the href. So the href is actually null until a real human user mouses-over the link, then it gets constructed from yourname @ yourwebsite.com.
Most spam bots look for mailto: and copy anything that follows it in a name@domain.com pattern, so this should confuse them. users without javascript get no click mailto: support, but can still read the email address.
For the best of both worlds, take the "yourname", "@" and "yourwebsite.com" bits of the email address and the "yourname@yourwebsite.com" inside the link and run them through the character mangler given at the top of this post. Or, just put "Email Us" or even an image in the anchor tag as follows: