Sue Nolff's Weblog

website design & hosting, SEO, email marketing

Email linking on your site

September23

The days of the mailto: email link should be long gone, but unfortunately there are still millions of those type of links out there. I don’t necessarily mean unfortunately for you or me; I mean unfortunately for the millions of people who are the poor recipients of email from such links out there.

There are thousands of nasty little spambots out there just searching the web hour after hour, zeroing in on that little snippet of code known as a mailto: email link. Bingo, when they find one, the email address that comes immediately after mailto: in the link will be massively bombarded over time with spam. Did you ever really wonder how that poor widow in Nigeria got your email address?

Every good web design company has an even better web programmer. That web programmer can spend up to 1/3 of his or her time just trying to stay one step ahead of the hackers and spammers. In larger companies, it can be a full time job.

The mailto: spam debacle is generally one of the easier problems to troubleshoot, and I’ve seen many different workarounds.

Some people just type out their email address but don’t make it a link. This is fine, but it forces the person who wants to email you to have to write it down, or copy it over to their email program in order to email you. That’s where human error enters the picture.

Some are even afraid to type out their full email address on a web page so they take that human error factor one step deeper and tell people to email them at myname at mysite.com.

Now, I’ve also seen some ingenious workarounds. I’ve seen code that turns typed email addresses into images of the letters because the spambots can’t read text in images. That one is pretty cool!!! But it’s also pretty complicated for the average site.

My favorite solution is a simple javascript, placed in an external javascript page. I’m so fond of it that I’m about to share it with you. Copy and paste the following into your external javascript page, or just in the head area of your page:

<script type=”text/JavaScript”>
<!- -
  function myEmail(prt1,prt2,id,subject){
    //redirect to mailto
    if (subject == undefined ){
      window.location = ‘mailto:’+ prt1 +’@’+ prt2;
    }else{
      window.location = ‘mailto:’+ prt1 +’@’+ prt2 + ‘?Subject=’ + subject;
    }
    return false;
  }
– ->
</script>

Now instead of the mailto: email link in the body of your document use this:

<a href=”javascript:void(0);” onClick=”myEmail(‘myname’,’mysite.com’,this,’Website Contact’);” title=”Click here to email us”>email us</a>

Now how cool is that?! And if you think about it, how much more simple could it be?



Print This Post Print This Post

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to FriendFeed Send Gmail Post to LinkedIn Post to StumbleUpon

posted under Design, Home, Security
9 Comments to

“Email linking on your site”

  1. On May 23rd, 2011 at 7:46 pm tv online live Says:

    Interesting, I wonder what the statistics are on your first point there…

  2. On May 25th, 2011 at 8:12 am sohbet Says:

    Hi, i think that i saw you visited my blog thus i came to “return the favor”.I’m trying to find things to improve my website!I suppose its ok to use a few of your ideas!!

  3. On May 28th, 2011 at 10:04 am tv online Says:

    I thought it was going to be some boring previous post, but it seriously compensated for my time. I will publish a website link to this page on my weblog. I am certain my website visitors will discover that pretty useful.

  4. On May 29th, 2011 at 5:54 pm host gator coupon Says:

    Every time I stumble upon a great blog post I usually do one of three thing:1.Forward it to all the close contacts.2.Bookmark it in all of the popular bookmarking websites.3.Make sure to return to the same website where I first read the article.After reading this article I’m really thinking of doing all of the above!

  5. On June 9th, 2011 at 10:18 am Rashida Can Says:

    Major thanks for the article post. Will read on…

  6. On June 23rd, 2011 at 7:20 pm Galen Bohonik Says:

    Excellent article and easy to understand explanation. How do I go about getting permission to post part of the article in my upcoming news letter? Giving proper credit to you the author and link to the site would not be a problem.

  7. On July 22nd, 2011 at 12:12 pm Cathy Pazan Says:

    The blog was absolutely fantastic! Lots of great information and inspiration, both of which we all need!

  8. On July 25th, 2011 at 2:33 am Jean Ennels Says:

    Wow! This can be one particular of the most helpful blogs We’ve ever arrive across on this subject. Actually Magnificent. I’m also an expert in this topic so I can understand your hard work.

  9. On August 9th, 2011 at 12:34 am Sms Says:

    I wish more people would write blogs like this that are really enjoyable to study. With all of the fluff floating about on the web, it’s rare to read a weblog like yours instead.

Email will not be published

Your Comment:

 




Host your own blog, just like I do here at suenolff.com



Copyright ©2017 SueNolff.com  •  hosted at 1and1.com