Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Email address on a site

  • 24-01-2010 4:49pm
    #1
    Registered Users, Registered Users 2 Posts: 259 ✭✭


    Hi, I have a contact form on my website with a captcha image to protect from spam. I also want to put my email address on the site. I was going to put it as an image, but I would like people to be able to copy and paste the address. Is there any decent way to protect from spambots getting my address, its really just a personal site and wont have very high traffic.

    Thanks.


Comments

  • Registered Users, Registered Users 2 Posts: 742 ✭✭✭Pixelcraft




  • Registered Users, Registered Users 2 Posts: 259 ✭✭cobijones


    Thanks, I was just wondering if that sort of obfuscated code (maybe wrong but is that just converted into Unicode?), is easily read by spam bots. I was wondering what ways professional designers go about preventing email address from getting attacked by spam or would that sort of protection be enough?


  • Registered Users, Registered Users 2 Posts: 81 ✭✭mattfinucane


    Here is a suggestion and something which has worked out well for me. Google have a trial based email hosting service - Google Apps - which will allow for the free hosting of one email address.

    Follow the link below:

    http://www.google.com/apps/intl/en/business/index.html#utm_medium=et&utm_source=catch_all

    I tried the javascript based email obfuscater but quite a lot of spam bots where picking up my email address anyway and I was getting spammed a lot.

    Another common method to catch out spam harvesting bots is to use hidden CSS to insert extra text into the email link and then hide it so that users don't see it - see below:
    
    <a href="mailto:me@domain.tld" title="Email me">
    me@<span style="display: none;">ignore</span>domain.tld
    </a>
    
    

    The link would appear as normal but when users copied the email address the hidden text would appear in it - a pain for most.

    I also had my own email server hosted on a Linux box which wasn't much use to me in the long run.

    The beauty of this is that it is relatively easy to set up and you don't have to worry about spam, because Google, who have excellent spam filters, end up catching it all.

    I ended up just posting my email on my site in plain text and I have had no problems with spam.


  • Registered Users, Registered Users 2 Posts: 259 ✭✭cobijones


    Thanks for the idea, the site is actually for an elderly neighbour, I'm not sure if he could handle changing his e-mail client. I've read about the css and I've heard alot of spam bots are wise to this, there was another method about using javascript to add a redundant email address to the source code but I think alot of bots were wise to this aswell.

    Is it advisable to just leave the email address off or put it in an image, and just use the contact form?


  • Registered Users, Registered Users 2 Posts: 1,802 ✭✭✭cormee


    Recaptcha.com offer a captcha service for email addresses.


  • Advertisement
  • Closed Accounts Posts: 263 ✭✭HandWS LTD


    cobijones wrote: »
    Hi, I have a contact form on my website with a captcha image to protect from spam. I also want to put my email address on the site. I was going to put it as an image, but I would like people to be able to copy and paste the address. Is there any decent way to protect from spambots getting my address, its really just a personal site and wont have very high traffic.

    Thanks.


    Sounds like you want your email displayed without the captcha and not in a form e.g email link displayed on every page and contact page.

    A better way is to use an encrypted email link without javascript. It will work as normal with the correct email link visable to the human eye while the spam robots will not be able to extract the address from the link.

    Just google "encrypted email link" and you'll get a few that will have your email address automatically encrypted after you have typed it in.


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    You could so this easily enough using jQuery or even plain old JavaScript
    <script type="text/javascript">
    $(document).ready(function() {
      tmpDomain=document.domain;
      $(".hideMail").each(function() {
         mailAddress=$(this).text()+"@"+tmpDomain;
         $(this).text(mailAddress).attr("href","mailto:"+mailAddress;
      });
    });
    </script>
    <a class="hideMail" href="contact.html">contact</a>
    


  • Closed Accounts Posts: 263 ✭✭HandWS LTD


    I am against using javascript for something like this. My reason for this, is that there is a small percentage of users that do not have java enabled on their web browsers. So by using javascript, those users will not see the proper email address nor will they be able to send the email to you.

    Javascript is good to use for certain aspects of the website but not for the email. This is why i feel using an encrypted email link is the best solution.


  • Registered Users, Registered Users 2 Posts: 742 ✭✭✭Pixelcraft


    HandWS LTD wrote: »
    My reason for this, is that there is a small percentage of users that do not have java enabled on their web browsers.

    Java or javascript? The percentage of people who browse without javascript is tiny, absolutely tiny - and if you're providing an alternative method of contact such as a contact form then problem solved.


  • Closed Accounts Posts: 263 ✭✭HandWS LTD


    I think he's not using a form for this, i believe he's using the email link on its own, and a captcha form in contact page (i may be wrong). Yes, the percentage is tiny. I just feel that something like this should be open to all users. Even the users without javascript enabled. You'll never know if those users will be trying to contact you via email....so they may just go elsewhere if it doesn't display right.


  • Advertisement
  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    HandWS LTD wrote: »
    I am against using javascript for something like this. My reason for this, is that there is a small percentage of users that do not have java enabled on their web browsers. So by using javascript, those users will not see the proper email address nor will they be able to send the email to you.

    Whether or not Java is enabled has no bearing on using JavaScript.

    Also, a quick Google for "encrypted email link" (as you suggested) provides numerous responses, most of which use JavaScript to achieve the result.

    Re Matt Finucane's code above, the href of the link is still mailto:me@domain.tld which would easily be picked up by the spambots.


  • Closed Accounts Posts: 263 ✭✭HandWS LTD


    Liam Byrne wrote: »
    Whether or not Java is enabled has no bearing on using JavaScript.

    Also, a quick Google for "encrypted email link" (as you suggested) provides numerous responses, most of which use JavaScript to achieve the result.

    Re Matt Finucane's code above, the href of the link is still mailto:me@domain.tld which would easily be picked up by the spambots.

    Sorry, correction....Javascript. Simple error.

    Any link you find similar to http://www.robspangler.com/blog/encrypt-mailto-links-to-stop-email-spam/ will work without javascript. "encrypted email link" was just an example of what to browse for. Other ways to find them are "encrypted email address to stop spam" with the link http://www.wbwip.com/wbw/emailencoder.html as a good example.

    Placing the code here will only display the correct email address. So if you follow this link http://www.wbwip.com/wbw/emailencoder.html you will get the correct code to add.


  • Registered Users, Registered Users 2 Posts: 259 ✭✭cobijones


    Thanks for the responses so far, just to clarify, at the moment I have a contact form with a captacha image and I also have the email address in an image else where on the page for users that want to use their own email client.

    Just from reading a few links, putting an alternative address with JavaScript seems to be easily hacked. Is this the case?

    As I said, its not going to have very high traffic and most people wanting to contact me will be happy enough to type the email address out rather than copy and paste it.

    Its just for my own knowledge that I'm wondering what would be the best way to display the email, or how it is done by professionals.


  • Registered Users, Registered Users 2 Posts: 742 ✭✭✭Pixelcraft


    I use js and don't get much spam at all to the general email address.


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    cobijones wrote: »
    putting an alternative address with JavaScript seems to be easily hacked. Is this the case?

    Depends on how you do it.

    If you do something similar to what I posted above, then there's no chance of a bot even recognising that it's a mailto: link.


Advertisement