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 ...

<!--- THIS CREATES A LIST OF THE MOST RECENT SUBSCRIPTIONS TO THE SHARE YOUR 
THOUGHTS DATABASE --->
<CFQUERY name="sendemail" datasource="#recipes#" maxrows="2000">
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</CFQUERY>

<CFLOOP query="sendemail" startrow="6" endrow="50">
<cfmail to="#email#" from="[EMAIL PROTECTED]" subject="Share Your Thoughts!" 
bcc="[EMAIL PROTECTED]" type="html">

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

<p> Please click on the link below to get started.   We appreciate your 
feedback.  
<p> 
<p> Thank you.
</cfmail>
</CFLOOP>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

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

Reply via email to