AntiSpambotMailto() - Hide your mailto: links from those nasty spambots!

CGI mailto forms provide the ultimate level of protection from spambots. However, unless you need that for other reasons such as database transactions, mailto links have the great advantage of ensuring that you receive the sender's correct email address. For example, there may be a typo when they enter it in the form. Plus, mailto links are more convenient for the user (less data entry and they get to use their good ole familiar email client).

The beauty of AntiSpambotMailto (besides the fact that it's FREE) is that the email address parameter is not just the usual collection of ASCII codes, which I imagine would be relatively easy for a spambot to recognize. Each encoded character is also offset by the total length of the email address. While it is possible that the spambot programmers could eventually write a parser for this, the offset hopefully adds just enough extra complexity so it is more likely they will die a horrible death before they have the chance to finish their evil deeds. And of course a minor modification is all it takes to screw them up again. For a spambot to be foolproof, they would have to write a complete JavaScript parser, which seems unlikely (I hope).

Download AntiSpambotMailto.js

And load the .js within the <HEAD></HEAD> section of your page as in this example:

<script language="JavaScript" src="AntiSpambotMailto.js"></script>

Then use this form to encode your email address:

Mailto address:
Text or HTML: (leave blank to display the email address)
<A> tag attributes: (optional, e.g. class="mailto")
 
 

You can view the source code of this page to verify that this form is not processed by any server-side script, just in case you're worried about submitting your email address. ;-)

(a real live example of AntiSpambotMailto() in action!)

But of course keep in mind that since this is freeware, I can't guarantee to be able to answer promptly or at all, especially if I am very busy, which is quite likely! The only reason I took the time to write this, in fact, is simply because I'm SICK OF SPAM!!! As for why I'm offering it to the world, well naturally it will be a better place when spam is eliminated forever. If we band together, we will surely win this war against Spammorism(tm)!

Feel free to rate this script at HotScripts.com

AntiSpambotMailto() Copyright © 2002 by Kenric L. Ashe - www.kenric.com - All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.