View Full Version : how to protect your email


nesianmysticfan
06-05-2004, 06:33 AM
this is a totorial on how to make spam protected email links.

1st, create a page where you want the email link to be.

2nd add this code:
<script language="JavaScript"><!--
var name = "yourname";
var domain = "yourdomain.com";
document.write('<a href=\"mailto:' + name + '@' + domain + '\">');
document.write(name + '@' + domain + '</a>');
// --></script>
This will make a email link which is protected and looks like yourname@yourdomain.com. To make it say what ever you want, try this
<script language="JavaScript"><!--
var name = "yourname";
var domain = "yourdomain.com";
var text = "link text here";
document.write('<a href=\"mailto:' + name + '@' + domain + '\">');
document.write(text + '</a>');
// --></script>
and that will look like link text here and link to mailto:yourname@yourdomain.com

3rd edit out the bits in bold on the script with your email parts.

Then your finished. Hope you don't get as much spam now as this protects your email from spam bots.