What works better in CF7 for validating an email address?

isValid?
isValid("email", request.email)

or something like:

function IsEmail(address) {
if(REFindNoCase("[[:alnum:]_\.\-]+@([[:alnum:]_\.\-]+\.)+[[:alpha:]]{2,4}",address))
 
return TRUE;
else return FALSE;
}

I've been using IsEmail, and it's been working pretty good. Today, the 
client using the site sends to a couple of hundred messages out to 
addresses like:
[EMAIL PROTECTED]

IsEmail validated them, and they were delivered properly.

But there was one in the list that was *invalid* and isEmail let it 
through: [EMAIL PROTECTED]@somewhere.com.rpost.org

IsEmail cleared it, and so CFMAIL threw an error when it tried to send, 
triggering my error trapping and aborting sending the rest.

So, the questions are:
1. What would isValid have done with "[EMAIL PROTECTED]"? 
2. What would it have done with 
"[EMAIL PROTECTED]@somewhere.com.rpost.org"?

3. isValid does *not* match up with the CFMAIL tag when it comes to what 
each will allow, creating some obvius problems.  Is there anything out 
there that matches more closely?



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307455
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to