Information Sheet
Spam Proof Mail Links
The biggest source of email addresses used by spammers is from
websites. Most sites list multiple contact addresses - any time
an email address appears on your website in plain text, even if
it's hidden in a form field, you open yourself up to having that
email address captured. Spammers use spiders to visit site after
site to collect email addresses. These are known as spambots or
email harvesters
Schools editors may be interested in protecting the email addresses
on their sites, simply to reduce the amount of junk mail which comes
in, although IS does use spam filters on the email servers.
A spam-proof Mailto link
This snippet of JavaScript creates a clickable link that launches
the user's email application, assuming that their system is configured
to work with "mailto:" hyperlinks. You can replace the
link text with your own message. Please see the next example if
you want to display your email address as the link text.
<script language=javascript> <!-- var username = "username"; var hostname = "yourdomain.com"; var linktext = "click here to send an email"; document.write("<a href=" + "mail" + "to:" + username + "@" + hostname + ">" + linktext + "</a>") //--> </script>
gives the following
A spam-proof Mailto link that shows the email address
Some visitors won't be able to use a mailto link. This snippet shows
your email address in the link so they can copy and paste, or type
it by hand. This method is preferable to the first and is in keeping
with our policy on naming email links:
<script language=javascript> <!-- var username = "username"; var hostname = "yourdomain.com"; var linktext = username + "@" + hostname; document.write("<a href=" + "mail" + "to:" + username + "@" + hostname + ">" + linktext + "</a>") //--> </script>
gives the following:
Another technique: Use A Contact Form
A contact form can enable you to deal with a higher volume
of mail, by allowing you to pre-sort different types of message.
This is easily accomplished by creating a drop-down menu with different
options that will populate the subject line of the email message,
and/or change the email address to which the form is sent.
As many spambots simply read the entire HTML source of the page
in search of anything that looks like an email address, your contact
form may not protect you, if you include your email address in the
form's HTML (for example, as a hidden field). You can use JavaScript,
as shown in the example below, to mask the address.
Masking The Email Address In A Form Field
Instead of simply listing your email address in a form field, use
the snippet below to replace the form field that contains your email
address.
<script language=javascript> <!-- var username = "username"; var hostname = "yourdomain.com"; var linktext = username + "@" + hostname; document.write("<input type=hidden name=email value=" +username + "@" + hostname" + ">"; document.write(username + "@" + hostname); //--> </script>
|