Vijay Ganesh
Protecting your email from SPAM sources is on the “important things that needs to be taken care of” list when we come up with websites. Normally, when we make our email available through website in plain text the email harvesting bots from SPAM source are able to retrieve them for spamming purposes. But taking of the plain email links will lead to other complications like deploying a flash based movie with emails which will cause troubles for users without flash plug-in and so on.
The best way to deal with this problem is to use a email munger. Email munger is an application which will take in a plain looking email address (eg. [email protected]) and change the characters to ASCII codes so that the spam bots wont recognize them as emails example:
|
|
In the above case the email [email protected] was converted into HTML escaped ASCII encoded string by email munger. Even though spam bots wont be able to recognize the text browsers will not have any problem reading / parsing them.
Below is the sample code in C# for converting a plain email to its munged form:
|
|
As you can see all the fun happens at line 5 where we convert the character to its ASCII equivalent.
Related Links:
Automatic Email Munger, An antispam tool for hiding your email address in a web page from spamrobots by Daniele Raffo