How to securely display an e-mail address on a website ?

By swishsticks
Oct 3, 2004
Topic Status:
Not open for further replies.
  1. I am helping a charity which suffers a lot from spam and virus e-mails. They have a website on which their e-mail address is openly displayed. I guess this address has been visited by automatic e-mail harvester programs because they receive up to 300 spam and virus mails per day.

    I'm not at all technical with websites, so I'm looking for a very simple solution. Would it be more secure to put this on the website, for example:

    "abc500@provider.uk (Remove 500 from the e-mail address)"

    In other words, put an incorrect address on the website, but with an accompanying instruction which a human could read and interpret. Or in some other way to break up the address, like this:

    "abc at provider.uk (replace 'at' with '@' to send a message. Leave no spaces.)"

    Any basic advice much appreciated. I'm afraid that any technical advice about java script or the like will go straight over my head ...

    Thanks.

    Swish
  2. Nodsu

    Nodsu Newcomer, in training Posts: 9,431

    The first version would not be that good since the spam would still get sent to the fake address putting a load on the provider.uk mailserver or some poor sod who actually has this fake address.

    Another solution would be to put up a picture of the address.
  3. StormBringer

    StormBringer Newcomer, in training Posts: 2,871

    I've always liked using something like stormbringer "at" mailserver "dot" com, but Nodsu's idea of the image is also good since bots can't parse an image.
  4. RealBlackStuff

    RealBlackStuff Newcomer, in training Posts: 8,165

    A much cleaner solution would be to stick that email-address in a javascript file.

    At the location in the html-page where you want to display the address and/or email, insert the following line:
    <script language="JavaScript" src="contact.js"></script>

    The file "contact.js" looks like this:

    <!-- Begin
    <!-- NOTE: If you use a ' add a slash before it like this \' -->

    document.write('Your Name or Company<br>');
    document.write('10901 Your Road Hwy. Suite 301<br>');
    document.write('Chicago, IL 60060<br>');
    document.write('PHONE: (312) 555-5060<BR>');
    document.write('FAX: &nbsp;&nbsp;(312) 555-5050<BR>');
    document.write('<BR>E-mail us: ');
    document.write('<A HREF="mailto:info@yourdomain.com">info@yourdomain.com</a><br>');
    // End -->

    In it's most simple form the file would look like:
    <!-- Begin
    document.write(' E-mail us: <A HREF="mailto:info@yourdomain.com">info@yourdomain.com</a>');
    // End -->

    The <br> is a carriage return or "new line"
Topic Status:
Not open for further replies.


Add New Comment

TechSpot Members
Login or sign up for free,
it takes about 30 seconds.
You may also...


Get complete access to the TechSpot community. Join thousands of technology enthusiasts that contribute and share knowledge in our forum. Get a private inbox, upload your own photo gallery and more.