And if you're on MX 7, you can use the isValid function with
type="email".

> -----Original Message-----
> From: Jose Diaz [mailto:[EMAIL PROTECTED] 
> Sent: Friday, April 14, 2006 1:37 AM
> 
> On cflib.org there is a function titled 'isEmail' I have used 
> this a few
> times to validate emails. The function code is a s follows:
> 
> 
> <cfscript>
> function isEmail(str) {
>     return 
> (REFindNoCase("^['_a-z0-9-]+(\.['_a-z0-9-]+)[EMAIL PROTECTED](\.[a-
> z0-9-]+)*\.(([a-z]{2,3})|(aero|coop|info|museum|name|jobs|trav
> el))$",arguments.str)
> AND len(listGetAt(arguments.str, 1, "@")) LTE 64 AND
> len(listGetAt(arguments.str, 2, "@")) LTE 255) IS 1;
> }</cfscript>
> 
> Another alternative if you are using sql server is to doa  sql
> function and wrap the email element in that for validation.
> 
> Hope this helps
> 
> On 4/14/06, Denny Valliant <[EMAIL PROTECTED]> wrote:
> >
> > A crazy option would be to use a regular expression 
> (available in MySQL)
> > to
> > grab only valid emails.
> >
> > Heh. With the regex stuff going  on, had to mention it.
> >
> > By the by, a useful resource for regex for me has been
> > www.regular-expressions.com.
> > :D3|\|*
> >
> > On 4/13/06, Dawson, Michael <[EMAIL PROTECTED]> wrote:
> > >
> > > I think you are totally correct.  You will need to do the 
> CFLOOP thing
> > > to be able to catch an individual CFMAIL exception.
> > >
> > > M!ke
> > >
> > > -----Original Message-----
> > > From: Rick Root [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, April 13, 2006 9:07 PM
> > >
> > > If I'm using cfmail with the query attribute, populating 
> the to address
> > > dynamically... how to I catch an individual exception?
> > >
> > > Like if one row in the query contains an invalid email 
> address that
> > > throws a cfmail exception.
> > >
> > > If i put try/catch around the whole cfmail tag set it'll 
> actually stop
> > > the whole mailing...
> > >
> > > I'm assuming there's no way to do what I want to do 
> without axing the
> > > query attribute and doing something like
> > >
> > > <cfloop query="foo">
> > >         <cftry>
> > >                 <cfmail from="[EMAIL PROTECTED]" to="#email#" 
> subject="foo">
> > >                   ...
> > >                 </cfmail>
> > >                 <cfcatch type="any"></cfcatch>
> > >         </cftry>
> > > </cfloop>

This transmission may contain information that is privileged, confidential 
and/or exempt from disclosure under applicable law. If you are not the intended 
recipient, you are hereby notified that any disclosure, copying, distribution, 
or use of the information contained herein (including any reliance thereon) is 
STRICTLY PROHIBITED. If you received this transmission in error, please 
immediately contact the sender and destroy the material in its entirety, 
whether in electronic or hard copy format. Thank you. A1.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237755
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to