Software, your way.
burger menu icon
WillMaster

WillMaster > LibraryGenerators and Converters

FREE! Coding tips, tricks, and treasures.

Possibilities weekly ezine

Get the weekly email website developers read:

 

Your email address

name@example.com
YES! Send Possibilities every week!

Resurgence of mailto: Links (and Spam Prevention)

Twenty years ago, when I first started programming software for websites, the mailto: link was a popular feedback mechanism. (Further below is a mailto: link generator with option to obfuscate the link for spam prevention.)

This is how the mailto: link works:

  1. The site user clicks a mailto: link.

  2. Their email software opens with the website owner's email address pre-filled in.

  3. They send a message to the site owner.

All done. No navigating to a contact page. No annoying CAPTCHA. Just done.

Here is an example mailto: link.

Mail Me!

This is how the above mailto: link is coded.

<a href="mailto:name@example.com">Mail Me!</a>

Dwindling Popularity

After a period of popularity, two things happened to make the ease of mailto: links less appealing and to precipitate a dwindling interest.

  1. Spammers increasingly sent email address harvesting robots to websites for collecting email addresses to spam. (It turns out website owners are averse to being spammed )

  2. Website email services such as Hotmail and Gmail became popular. The mailto: link doesn't work with those services. (If the example link further above didn't work for you, this may be the reason.)

The email address harvesting problem was addressed by various obfuscation techniques. Some worked well, some not so well. None were 100% effective.

As website email services became ever more popular and less and less site visitors could use mailto: links, active interest in foiling email harvesters also dwindled.

The Resurgence

With the rapid gain of mobile devices, the mailto: link has become more appealing. Here's why:

Mobile devices tend to have an email app on board.

With an properly-installed email app on board, the mailto: link works like it was originally intended to — it opens up the email app with some or much of the email pre-filled in.

With the resurgence, email address harvesting robots again have fodder.

You see, the mailto: link generally has an email address attached. It may also have Cc: or Bcc: addresses attached.

So here we are, obfuscating mailto: links again.

Obfuscating the mailto: Link

The form below can provide the obfuscation. Simply copy and paste the generated code.

You may optionally specify the To:, Cc:, and Bcc: addresses for pre-filling. Also optionally, the email subject and body content to pre-fill when the mailto: link is clicked.

The generated link can be clear text or it can be obfuscated. (Base 64 encoding is used in a special way.)

The obfuscation has these positive points:

  1. There is no "mailto:" for robots to find because the mailto: protocol itself is encoded.

  2. Encoding is unidentified. The encoding technique is unidentified. It merely appears as a bunch of characters.

  3. The link particulars are not in the href attribute. JavaScript decodes and copies the mailto: protocol and link value into the href attribute only when the link is tapped or clicked.

  4. Most robots don't run JavaScript. Because it is decoded with JavaScript, the robot would need to run JavaScript like a browser to even know it was a mailto: link, much less to find out what it contained.

Here is the live form.

Want a form like that for your site?

You can. And it's free. (Also mobile device friendly.)

Paste this one line of JavaScript into your web page and you're good to go. (WordPress users, select the "Text" tab, not the "Visual" tab, before pasting in the line of JavaScript.)

<script type="text/javascript" src="https://www.willmaster.com/external/mailto/mailtolink.php"></script>

The live form inside the border further above is the same one that will appear on your web page when you paste in that one line of JavaScript.

The border is optional. If you wish to have a border, put the line of JavaScript into a div with a border — which is what I did. The div may be designed as you wish.

The fonts and perhaps the text field designs will be affected by the CSS of your site. It lets the form fit better into your website style.

Advantages

What are the advantages?

  1. Paste it and forget it. To install the mailto: link generator, paste one line of JavaScript code into your page. All done.

  2. Increase social mentions and bookmarking. With a service perceived to be of value and worth mentioning, it's more likely to be mentioned on social sites and bookmarked for returning again and again.

  3. Better bounce rate. Google's bounce rate measures how quickly people leave your page. When they use your form, they stay longer.

  4. Automatic and instant updates. Whenever the software is updated, your installation will be updated automatically and available the very next instant someone uses the form.

Those are some of the advantages to you when you provide the mailto: link generator for use by your site visitors.

Turning it Around

Now, consider the advantages to you if you were to provide a calculator or form or service for website owners that is easy to install and that comes with traffic advantages and auto-updates.

Potential advantages include (depending on what you offer and how you offer it):

  1. A link back to your website.

  2. A way to demonstrate your expertise.

  3. Income (if you require payment).

Depending on what you are providing, there are likely to be a bunch of other benefits.

Whether you will be providing it freely or for pay, talk to us about it. (Or use the contact form.) Let's get it made so you can start offering it and reaping the benefits.

(This article first appeared with an issue of the Possibilities newsletter.)

Will Bontrager

Was this article helpful to you?
(anonymous form)

Support This Website

Some of our support is from people like you who see the value of all that's offered for FREE at this website.

"Yes, let me contribute."

Amount (USD):

Tap to Choose
Contribution
Method

All information in WillMaster Library articles is presented AS-IS.

We only suggest and recommend what we believe is of value. As remuneration for the time and research involved to provide quality links, we generally use affiliate links when we can. Whenever we link to something not our own, you should assume they are affiliate links or that we benefit in some way.

How Can We Help You? balloons
How Can We Help You?
bullet Custom Programming
bullet Ready-Made Software
bullet Technical Support
bullet Possibilities Newsletter
bullet Website "How-To" Info
bullet Useful Information List

© 1998-2001 William and Mari Bontrager
© 2001-2011 Bontrager Connection, LLC
© 2011-2024 Will Bontrager Software LLC