I use the following UDF (from www.cflib.org) that envrypts the email while
still being a valid, clickable address:

<cfscript>
/**
* When given an email address this function will return the address in a
format safe from email harvesters.
* Minor edit by Rob Brooks-Bilson ([EMAIL PROTECTED])
* Update now converts all characters in the email address to unicode, not
just the @ symbol. (by author)
*
* @param EmailAddress           Email address you want to make safe.
(Required)
* @param Mailto           Boolean (Yes/No). Indicates whether to return
formatted
email address as a mailto link.  Default is No. (Optional)
* @return Returns a string
* @author Seth Duffey ([EMAIL PROTECTED])
* @version 2, May 2, 2002
*/
function EmailAntiSpam(EmailAddress) {
var i = 1;
var antiSpam = "";
for (i=1; i LTE len(EmailAddress); i=i+1) {
antiSpam = antiSpam & "&##" &
asc(mid(EmailAddress,i,1)) & ";";
}
if ((ArrayLen(Arguments) eq 2) AND (Arguments[2] is
"Yes")) return "<a href="" & "mailto:"
& antiSpam & ">" & antiSpam
& "</a>";
else return antiSpam;
}
</cfscript>

Usage:

<CFOUTPUT>
#EmailAntiSpam("[EMAIL PROTECTED]")#<BR>
#EmailAntiSpam("[EMAIL PROTECTED]", "Yes")#<BR>
</CFOUTPUT>

Parameters:

EmailAddress - Email address you want to make safe - Required YES

Mailto - Boolean (Yes/No). Indicates if�you want to return formatted
address as a MAILTO: link. Default is NO.

Peter Tilbrook
Transitional Services - Enterprise eSolutions
Centrelink (http://www.centrelink.gov.au)
2 Faulding Street
Symonston ACT 2609

Tel: (02) 62115927



Important:  This e-mail is intended for the use of the addressee and may contain information that is confidential, commercially valuable or subject to legal or parliamentary privilege.  If you are not the intended recipient you are notified that any review, re-transmission, disclosure, use or dissemination of this communication is strictly prohibited by several Commonwealth Acts of Parliament.  If you have received this communication in error please notify the sender immediately and delete all copies of this transmission together with any attachments.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to