> URLEncoding email address to stop email harvesting?

> I want to urlencode email addresses in my CF code to prevent email
> harvesting and seem to have trouble sending email when the address is
> encoded.
> ---------------------------
> <CFMAIL
> TO="%64%61%76%65%2E%62%6F%73%6B%79%40%68%74%63%69%6E%63%2E%6E%65%74"
> FROM="%64%61%76%65%2E%62%6F%73%6B%79%40%68%74%63%69%6E%63%2E%6E%65%74"
> SUBJECT="Test-Encoded"
> TYOE="html">
> Test
> </CFMAIL>
> ---------------------------
> Will I have to pass the encode email address to a script that will decode
> it
> before sending the mail?

There's no significant reason why you should need or want to pass a
URLEncoded email address to a <cfmail> tag like this -- there's no way that
a web-spider could ever see the <cfmail> tag or its contents ( well -- there
are ways, but they require the CF Server to be _broken_ first, in which case
the solution is to fix the server, which you're going to be working on very
fervently anyway ) ... Sure it's possible to URLEncode email addresses
before they enter the database, however, I would probably stay away from
that approach and simply URLEncode any email addresses which end up
displayed on the public pages of your website, i.e.

<a href="mailto:#urlencodedformat(myquery.email)#">Send Us Email</a>

I'm not certain but I think placing the values outside the href, i.e. betwee
<a> and </a> in urlencodedformat may also be somewhat problematic.


hth

S. Isaac Dealey
Certified Advanced ColdFusion 5 Developer

www.turnkey.to
954-776-0046
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to