Re: catching a query based cfmail ...

2006-04-16 Thread Denny Valliant
Hmmm... maybe the DAO type-deal, but that's a lot of work. The idea was to
do it without looping the query first, so the isValid I don't think would
work.

The regex I mentioned was basically a way of putting some type of selection
in the query itself, saying, Grab me records with valid emails, which I
presume the MySQL regex engine is capable of, dunno for sure, and no idea
whatsoever about MSSQL and regex.

Just spreading out the work load, CF shouldn't have to do it all! ;-)


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237849
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


Re: catching a query based cfmail ...

2006-04-14 Thread Jose Diaz
Hi Rick

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|travel))$,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

Jose Diaz




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
  To: CF-Talk
  Subject: catching a query based cfmail ...
 
  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
 
 

 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237735
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=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


catching a query based cfmail ...

2006-04-13 Thread Rick Root
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


~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237724
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


RE: catching a query based cfmail ...

2006-04-13 Thread Dawson, Michael
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
To: CF-Talk
Subject: catching a query based cfmail ...

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

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237726
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=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: catching a query based cfmail ...

2006-04-13 Thread Denny Valliant
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
 To: CF-Talk
 Subject: catching a query based cfmail ...

 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

 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237731
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=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54