Designer at work

mailto:

This is how to write an email link:

<a href="mailto:someone@somewhere.com">
someone@somewhere.com</a>

It is a good idea to have the email address as the 'clickable link'. So that people who can't use email at that very moment can at least write it down, or print it out.

This is how it appears:

someone@somewhere.com

If the link is clicked on, the browser will open the default email program ready to start writing a new message.

hide from spam

Spam is unsolicited mail, junk mail in your mailbox. I stopped junk mail being put in my metal mailbox at the front of the house by putting a 'No Junk Mail' sticker on it. It worked a treat. You can't do that with email, yet. The only way to stop spam is to hide your email address.

solution one

Get yourself a free, disposable email that you can use to subscribe to sites that you just know are going to send you junk. Keep your 'good' email account only for communicating with those who won't send you junk. If the free account gets clogged, just throw it away and get a new one.

solution two

Write your email address in a non-readable form. Make a graphic of it and display it on your page. People can read it and write it down, but there's no link to it.

solution three

Use some programming to display your email. This is the way I've hidden my email from browsers. There's a Javascript program that writes out the address, but it's not visible in the source code of the page - so spam trawlers can't read it.

Whenever I want a link to my email address I put some Javascript in the source that calls the function. I can write something like makeEmail("Contact me") and this will be written to the page as Contact me. If I write makeEmail("address") then the link to my email looks like the link at the bottom of the page. The result is my email address is hidden from trawlers but not from people. My Javascript program looks like this:

function makeEmail(linkText) {
  var proto = "mailto:";
  var a   = "info";
  var a   = a + "@";
  var a   = a + "design-dtp";
  var dot = ".";
  var a   = a + dot + "com";
  var bsMail = a;

  if (linkText == "address") linkText = bsMail;
  var bsMailtag = '<a href="' + proto + bsMail + '">' + linkText + '</a>';
  document.writeln(bsMailtag);
}

Feel free to use and modify as you wish.