October 23, 2002
Spam-Proofing Your Website

I thought this article had some good tips...

As usual, I ended up modifying the example a little. I like including a default subject, so I added that into the snippet. The %20 are necessary for the subject string to be parsed properly. If you use spaces instead, everything in the subject after the first space gets truncated in the resulting link.

Note that I am also using a unique username so I can see if any SPAM is being generated by the link.

Here's my code:

<!-- email link -->
<script language=javascript>
<!--
var username = "davidfromblogdom";
var hostname = "blogdom.org";
var subject = "Hello%20from%20Blogdom";
var linktext = "Click Here To Send Me Email";
document.write("<a href=" + "mail" + "to:" + username +
"@" + hostname + "?Subject=" + subject + ">" + linktext + "</a>")
//-->
</script>
<!-- email link -->

Digg It!  Digg It!   del.icio.us bookmark  Bookmark it!  

Posted by David at October 23, 2002 07:44 AM
Comments

Great bit of code! I'm grabbing that! Thanks David.

Posted by: Jennifer on October 23, 2002 10:09 AM
Post a comment

Ability to add comments removed due to spam.

If you wish to add a comment, send an email to comments at blogdom dot org

replacing the at above with @ and the dot above with .