Industry guru Dave Taylor offers free tech support on a wide variety of technical and business topics, including HTML, online advertising, Cascading Style Sheets, Web design, management, Unix, Linux, search engine optimization, online dating, Mac OS X, shell script programming and Microsoft Windows.

Do you recommend that I avoid mailto: links on my Web pages?

Dave, I know that I can easily add links to my Web pages that let people click and send me an email message by specifying a mailto: URL. However, I've heard rumors that there are some problems with spammers snagging those addresses of my site? I hate spam, should I just avoid email addresses entirely?


Dave's Answer:

Tons of people have mailto links on their sites, and most of them probably wonder why they're getting an ever-increasing flood of spam to their inbox. This is yet another unfortunate ramification of spammers screwing up the Internet, in my opinion, because, yeah, it'd be nice to have a send me mail! link that worked, without having to worry about misappropriation and exploitation of the data. But that's not the world we live in.

So, yes, I recommend that you eschew any mailto links on your HTML Web pages.

There are some alternatives, however, so you don't need to be completely incommunicado. If you're optimistic, you can try using one of the many "URL scramblers" available that turn something like joe@his.addr.com into j oe @h i s . a d dr . c o m. Two to check out: SpamStopper (for Mac) and MAILTO GUARD (for Windows).

Other people replace their mailto or email address with a graphic, where you still have to type in their address, but at least you can see it while you're typing. I don't think that's particularly friendly, but understand their logic.

My solution is different and, I believe, simpler. I have a central contact form that all my different Web sites point to, and it seems to work great, without any concern about increasingly smart harvesting programs, etc. As far as I know, there's not a single email address on any of the thousands of pages I host.

Even better, people then self-categorize their messages too, and, based on what I've been reading in the terrific book Influence, I'm sure that if I asked visitors to assign an importance level to it, I could even help establish a reasonable-time-of-response expectation too.

    my contact page

One secret other benefit for those entrepreneurs among you: when visitors pop up the category menu on the contact form, they get another chance to find out my diverse interests and expertise and it might just entice them to spend a bit more time on my site exploring...

Hope that helps clarify this sticky issue.



Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Stumble Upon    

Subscribe!

Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader.

Comments

I use a java based program that hides the address, seems to work good.

Posted by: Steve at March 3, 2005 3:48 PM

Any chance of an example CGI script, similar to your "inject-query.cgi", since obviously we can't look at that! My webpage has a guestbook, which uses a CGI script that presumably operates along similar lines to your contact script (it's a moderated guestbook, so I'm emailed with entries), but it would be nice to see a professional's version!

Posted by: Steve E. at March 4, 2005 5:03 AM

Actually, I present almost exactly the same Perl CGI script in my book Creating Cool Web Sites with HTML, XHTML and CSS :-)

Posted by: Dave Taylor at March 4, 2005 5:07 AM

I think this contact form is a great approach. but, i'm not sure how to create one - for use with a blog that is hosted using typepad. any suggestions? thanks.

Posted by: Neal Moore at March 4, 2005 5:11 AM

That's a tough one, Neal. You might contact the TypePad sysadmins and ask them if it's possible to get a custom version of the CGI form (because you don't want your email address embedded in the HTML source of the form, because then, again, it something that theoretically can be scraped by spammers).

Hmmm... If they can't give you something custom (which I bet is the case) then why not suggest that they add a few lines of Perl to the existing script so that you could disassemble your email address and send it as two or three variables, rather than one obvious email address.

I'm thinking something like this:

    neal@typepad.com

would be sent as:

<input type="hidden" name="em_name" value="neal">
<input type="hidden" name="em_domain" value="typepad">
<input type="hidden" name="em_tld" value="com">

Nice, simple, easy to implement, and it would keep away all but the most enthused of spammers.

Good luck and please let us know what happens!

Posted by: Dave Taylor at March 4, 2005 5:18 AM

Neal, if my understanding of Typepad is correct, you need to have Typepad Pro in order to fiddle with things at this level in the code.

If anyone needs a PHP script for this, you can have mine. I've been considering cleaning it up a bit and putting it in one of the PHP script repositories as public domain code. A sample is here:

http://www.vardaman.org/contact

Shout at me if you want it. I'm at mailto:...uhh...scratch that. :)

It checks input on the server side. A few possible enhancements would be some client-side javascript checking, and maybe using javascript's focus() to set the cursor on the field that needs editing.

Posted by: Stewart Vardaman at March 4, 2005 6:04 AM

I would be happy to provide any of Dave's readers a PHP script also that takes form input and emails it to an email address. The script includes Javascript that checks that all required form fields are filled in as well. If interested, checkout the Contact Scott link on my web page and use it to Contact me. :)

Posted by: Scott at March 5, 2005 3:27 PM

I had a cgi script that it read from a list.txt file hidden in the cgi-bin that had all my URL's the http: and the mailto: and it was very simple , I lost my script and can't find it no where on the web. This was like 7 years ago I had over 1000 pages and emails listed including links to other websites and all in a simple list and the anchor tag pointed to the script and then outputed the URL to the email program or the browser. Can you help me find this script or help me understand how to create this simple simple little script which is lost somewhere on the web? This is the best way I know of that would hide all your links on any webpages as long as you had cgi access and this simple script that read from a txt file which was just a list of your links. Thank's

Posted by: Jeffrey at August 22, 2005 7:58 PM

You could ostensibly accomplish something like what you say, Jeffrey, with a service like http://www.microURL.com/ but it's sure be a ton of work...

Posted by: Dave Taylor at August 23, 2005 5:31 PM

Thank Dave, I looked but its like you said "a ton of work" I wish I new what the script was called , all I can remember was like gofetch or something where the anchor tag had a name value and pointed to the script then it ran through the list and found the name and then produced the URL and used the print function,

I found this but I think its for a form with the option tag but its a start

here is the code I found, hope it makes sense..

#!/usr/local/bin/perl

require("cgi-lib.cgi");
&ReadParse;

open(FILEHANDLE,")
{
$line =~ s/\n//g;

($product,$goto) = split(/\|/, $line);
if($product eq $in{'gofetch'})
{
close FILEHANDLE;
print "Location: $goto\n\n";
exit;
}
}

this is all I can find but I am not sure how to put an anchor tag to it, I got the option tag within the form tag to work and the list.txt is all in single colum like this..

well first the option tag looks like
AOL
MSN
Yahoo

then the list.txt is formatted like this

AOL|http://www.aol.com/
MSN|http://www.msn.com/
Yahoo|http://www.yahoo.com/

and this works in a form tag but its not the anchor tag like I had but real close to what I had . so can this be rewritten to use the name attribute in a Anchor tag to call the list up in the script somehow... I tried everything and know it must work somehow because I had a script that would fetch stuff and it was meant to hide emails along time ago when evil-bots appeared.. thanks Dave for any help you got, if you can't figure it out then I will just give up because no one is as smart hehehe okay ... thanks again

Posted by: Jeffrey at August 25, 2005 6:30 AM

Dave I am looking for a contact screen with some security like you have developed. This is for a church site. Where can I get the HTML code to embed into the Church Web Site? I currently have pulled in 2 different contact screens but they are not secure.

Posted by: Randy Watkins at January 17, 2006 3:11 PM

Not sure what you're seeking, Randy. Are you trying to avoid spam coming into your system? Are you seeking a "human verification system" like my little math equation?

Posted by: Dave Taylor at January 17, 2006 6:17 PM

Dave I noticed that on your site you have a checkbox as your "human verification system", how does one go about setting either a checkbox or a math equation password type of security. Im using Dreamweaver MX 2004.

Posted by: John at August 15, 2006 5:09 PM

Hi,

I'm getting spammed by the viagra dude.. 100 forms sent a day.

I think the addition question would help get rid of him.

Can you please help me put the addition question on my form:

http://www.aircharterbahamas.com/pages/request.html

THANKS MAN..

Cliff

Posted by: cliff at February 1, 2007 5:56 PM

Don't let spammers stop you from putting mailto links on your site. There are lots of solutions to get around spiders and harvesters. Try http://www.spamshiv.com/solutions/forms.php. There are some good ideas on this site that I've used with success.

Posted by: Jeff at October 31, 2007 12:42 PM

very helpful.
thank you

Posted by: jim s at June 22, 2008 4:13 PM

I have a lot to say, but ...
Starbucks coffee cup I have a lot to say, and questions of my own for that matter, but most of all I'd like to say thank you for all your efforts on this Web site by buying you a chai!

I do have a comment, now that you mention it!









Remember personal info?


Please note that I will never send you any unsolicited commercial email. Ever.

While I'm at it, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site.









Uniblue: Free Virus Scan

Search
Find just the answers you seek from among our 2000+ free tech support articles by using our Lijit search engine.


Help!





Subscribe to
Ask Dave Taylor!

Add to Google Reader
Add to My Yahoo!
Subscribe in NewsGator Online

RDF   XML

Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.


Recent Entries
Join the List!
Join my author info mailing list, where you'll learn about my upcoming books, speaking gigs, and more!


Book Links
© 2002 - 2009 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site.

[whiteboard marker tray]
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.