Re: Check for valid email before CFMAIL

2007-05-01 Thread Matt Robertson
verify your email addresses above the cfmail statement as described.
if not valid email then branch your code to notify somebody that
Record X has a sucky address that needs fixing (I compile a complete
list of all failures and only send the list once its finished).

After that, surround your cfmail statement in a try/catch block, where
the catch block also adds notification to the list you are already
compiling.  By putting cfmail into a try/catch block you allow the
other cfmail statements in your query loop to run despite the failure
of one or more cfmail statements.

You wind up with a much more robust chunk of code.  I never use the
query attribute of cfmail anymore.

-- 
[EMAIL PROTECTED]
Janitor, The Robertson Team
mysecretbase.com

~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

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


Re: Check for valid email before CFMAIL

2007-05-01 Thread Robertson-Ravo, Neil (RX)
Or just "isValid() + Livedocs" 

Less to type...

:-)

"This e-mail is from Reed Exhibitions (Gateway House, 28 The Quadrant,
Richmond, Surrey, TW9 1DN, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions." 
Visit our website at http://www.reedexpo.com

-Original Message-
From: Rick Root
To: CF-Talk
Sent: Tue May 01 18:59:33 2007
Subject: Re: Check for valid email before CFMAIL

Shoot I forgot..

CFMX 7 introduced isValid() which allows you to validate the format of
an email address.

google isValid +site:livedocs.adobe.com



~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

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


Re: Check for valid email before CFMAIL

2007-05-01 Thread Rick Root
Shoot I forgot..

CFMX 7 introduced isValid() which allows you to validate the format of
an email address.

google isValid +site:livedocs.adobe.com

~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

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


Re: Check for valid email before CFMAIL

2007-05-01 Thread Rick Root
google, isEmail +site:cflib.org

You won't be able to use the query attribute on cfmail if you have
badly formatted email addresses in your database though... unless you
loop through the query and "correct" or "remove" the rows with invalid
email addresses first using the UDF you find on cflib.

Rick


On 5/1/07, Josh Nathanson <[EMAIL PROTECTED]> wrote:
> > I've got a database that didn't use form validation and some email
> > addresses are
> > not valid.  So before I use the cfmail tag to send these out how can I
> > check to make
> > sure it's a valid email address?
>
> It depends what you mean by "valid".  You can check for valid syntax on the
> fly using isValid("email",email) (CF7 only).  At least this will allow you
> to get through the whole list without generating an error.
>
> Checking to see if the email box exists on a server somewhere is another
> issue and is more tricky to handle - there are solutions out there to handle
> that though.  I don't think you want to do that on the fly as it's quite
> slow.
>
> Mmmm, yogurt.
>
> -- Josh
>
>
> 

~|
Create Web Applications With ColdFusion MX7 & Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

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


Re: Check for valid email before CFMAIL

2007-05-01 Thread Josh Nathanson
> I've got a database that didn't use form validation and some email 
> addresses are
> not valid.  So before I use the cfmail tag to send these out how can I 
> check to make
> sure it's a valid email address?

It depends what you mean by "valid".  You can check for valid syntax on the 
fly using isValid("email",email) (CF7 only).  At least this will allow you 
to get through the whole list without generating an error.

Checking to see if the email box exists on a server somewhere is another 
issue and is more tricky to handle - there are solutions out there to handle 
that though.  I don't think you want to do that on the fly as it's quite 
slow.

Mmmm, yogurt.

-- Josh


~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & 
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

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


RE: Check for valid email before CFMAIL

2007-05-01 Thread Andy Matthews
You can check to see if the email is syntactically correct, but short of 
opening a socket to the mail server used by that email, there's no way of 
checking that it's a "real" email address.

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 01, 2007 11:21 AM
To: CF-Talk
Subject: Check for valid email before CFMAIL

I've got a database that didn't use form validation and some email addresses 
are not valid.  So before I use the cfmail tag to send these out how can I 
check to make sure it's a valid email address?

Code ...

 
SELECT dbo.mailprofiles.email, dbo.mailprofiles.firstname
FROM dbo.subscriptions INNER JOIN
  dbo.mailprofiles ON dbo.subscriptions.mailprofileID = 
dbo.mailprofiles.mailprofileID INNER JOIN
  dbo.newslettertypes ON dbo.subscriptions.newslettertypeID 
= dbo.newslettertypes.newslettertypeID
WHERE (dbo.subscriptions.newslettertypeID = 16) 
ORDER BY dbo.subscriptions.datesubscribed DESC

 

Hello #firstname#,
 Recently you told us you'd be interested in sharing your thoughts with 
us about our products.  Please let us know what you think  about some new 
yogurt flavors. As a thank you for completing our  short survey, we'll 
enter your name in a drawing to win 

 Please click on the link below to get started.   We appreciate your 
feedback.  

 Thank you.





~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

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