Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


July 2002

Elegant Email Hyperlinks

RSS
Subscribe to Windows Web Solutions | See More IIS and Web Administration Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Download the Code Here

My company typically uses mailto hyperlinks in our Web site so that visitors can use their favorite desktop email clients to automatically send us email. Unfortunately, these hyperlinks put our Web sites' email addresses for both the Webmaster's and users' mailboxes at risk for being spammed. Spammers typically use robot software that's similar to a search engine to crawl the Web and search for <a href="mailto:"></a> patterns. When the software finds such patterns, it adds the corresponding link targets to the spammers' databases. The spammers then send bulk email to all the addresses they collect. To avoid this risk, you can use the hyperlink

<a href="javascript:clickmail(domain,mailto)"></a>

and write a simple JavaScript function that reassembles the link in the mailto@domain format, then triggers the link. For example, consider the link code that Listing 1 shows. You can rewrite this link, as Listing 2 shows, then use the JavaScript function that Listing 3 shows to reassemble and trigger that link. You can take this type of security to a higher level by removing the JavaScript code from the .htm page and maintaining it as a separate JavaScript file, which safeguards the email addresses we publish on our Web sites.

You can further extend the JavaScript function to automatically use the mailto hyperlink's other interesting features. For example, in a mailto link, you can fill the To, Cc, Bcc, Subject, and Body fields in the message box that the email client opens. Netscape Messenger goes one step further by letting you set the email priority.

End of Article



Reader Comments
dagadfgadfg

fasdfasdfasdf October 23, 2003


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 24, 2008

An often irreverent look at some of the week's other news, including a Vista Capable dismissal request, Zune price reductions, Morrow musings, Novell and Microsoft sitting in a tree ... two years later, Yahoo!, IE 6 on Windows Mobile, and so much more ...


Related Events Delivering Reliable and Effective Web-Based Applications

Making Web Application Perform Better: What to Watch, How to Watch It, and How to Fix It

Check out our list of Free Email Newsletters!

IIS and Web Administration eBooks Keeping Your Business Safe from Attack: Monitoring and Managing Your Network Security

Related IIS and Web Administration Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing