Forum Moderators: phranque
There is no point in adding a mailto link at all unless it works ... and you cannot assume real users will realise that parts need to be chopped out before using the link you provided.
If you don't want a functional mailto link yet want to display an address people can type into an email client and will get through - then create it as an image (and dont include the text as alt of course)
Unless harvesters install OCR on their screens it will only be humans that will be able to convert the pixel data on the image into a working textual email address they can use.
Otherwise surely hiding email addresses off page and allowing people to send mail via forms could work unless you really dont want people to be able to contact you.
1. Encrypt Mail with JavaScript
<script TYPE="text/javascript">
emailE=('name'+'@'+'widgets'+'.'+'com')
document.write('<A href="mai'+'lto:'+emailE+'">'+emailE+'</a>')
</script>
or..
2. Use Decimal NCRs
looks like this:
mail@widget.com
... here is a good converter:
[people.w3.org...]
or..
3. Use a combination of 1 and 2 for the very paranoid ;-)
Using an image of your address with no alt tag would be the safest tool against harvesters, but that will kill your usability. On the other hand it's going to have to be in plain text to be completely usable. It's a no win situation.
<a href="mailto:me@mysite.com">me@mysite.com</a>
Displays and works fine in current browsers but it doesn't "look" like an e-mail address, so the siphons seem to ignore it-- at least for now.
On the other hand, if the only reason for the link is for complaints, make it as difficult as you want. ;-}
How will you know that the email address they give is theirs? if it is not you are sanctioning someone unknown sending possibly abusive messages from your domain with the consequences that may bring. Make sure at least that it is not machine exploitable because if it is you will have a flood of mails though there in no time at all.
Yes you could handshake with the email address for confirmation but its an extra pain.
I think most people understand that forms are one way of communicating and are ideal for users browsing on machines where they dont have acccess to an email client. I dont think you should use forms without there also being a static email address or mailto link people could choose to use nearby.
Most of the time I hide an emailadres on the site when it is from a visitor; while still giving the opertunity to sent an email to that person. The sender simply doesn't know where it is heading :).
When it has to be displayed because it is a sales-adress or something like that I allways use the format:
"user . name # domain . tld"
(including the spaces)
Links to the contact-page contain a reference to the database where it has to fetch the adress.
The sender has the ability to sent a copy to himself.
And when the adres is exposed (in the above format) he also has the ability to type that into his own mail application.
I never received any spam on those adresses :)
EDIT
<<
Sorry I was thing this demonstrated a CC and a primary address,
so yes as is it works
How will you add a CC?
>>
I am not much of a JS person :)
thanks
Henry
[edited by: henry0 at 11:54 am (utc) on April 13, 2004]