So looping over the thousands of email addresses and running a regex
against it will not cause a large performance hit? I considered doing
that on output to catch the ones that I didn't handle coming in.
Everything that comes through any of my sites goes through a cfc method
that scrubs the data and runs an re on it to ensure it's at least in the
valid format.
John
-----Original Message-----
From: Barney Boisvert [mailto:[EMAIL PROTECTED]
Sent: Friday, June 25, 2004 2:43 PM
To: CF-Talk
Subject: RE: Mailing to email list using CF
Doing CFOUTPUT/CFMAIL is a huge performance hit, so you don't want to do
it that way. We manage mailing lists of pretty significant size, and we
use a combination of fairly aggressive validation at insertion time, and
at send time, we error check the list with a simple RE that every
address must validate against (the same RE is used as the final step of
insertion validation). Here's some example code:
<cfquery ... Name="get">
SELECT name, email
FROM recipients
</cfquery>
<cfset emails = arrayNew(1) />
<cfloop query="get">
<cfif Refind(email_re, email) EQ 1>
<cfset arrayAppend(emails, email) />
<cfelse>
<cfset arrayAppend(emails, "") />
</cfif>
</cfloop>
<cfset queryAddColumn(get, "email2", emails) /> <cfquery dbtype="query"
name="get">
SELECT *
FROM get
WHERE email2 <> ''
</cfquery>
<cfmail query="get" ....>
</cfmail>
> -----Original Message-----
> From: Burns, John D [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 25, 2004 11:29 AM
> To: CF-Talk
> Subject: Mailing to email list using CF
>
> I'm storing a list of users who have signed up for an email list in a
> database. I have a simple web app for users to use when they want to
> send something to their email list. When they click send, I'm using
> <cfmail query="blah"> to send the mail out to all of the users
> individually. The problem I've run into is that CF has choked on
> invalid email addresses (legacy ones that have been brought to me from
> other databases) and when that happens, CF produces an error and
> quits.
> I thought about doing <cfoutput query="blah"><cfmail
> to="#email#...></cfoutput> but I'm fairly sure that takes some serious
> performance hits or else there wouldn't be the query attribute to
> CFMAIL. Is there any way to tell CFMAIL to keep processing and just
> skip the invalid address? I'm guessing that a cftry/cfcatch block
> will only catch the error and move on but will not tell CF to finish
> the mailing.
>
> Any ideas? thoughts? Rants? etc?
>
> John
>
>
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- Mailing to email list using CF Burns, John D
- RE: Mailing to email list using CF Barney Boisvert
- Re: Mailing to email list using CF Matt Robertson
- RE: Mailing to email list using CF Paul Vernon
- RE: Mailing to email list using CF Burns, John D
- RE: Mailing to email list using CF Barney Boisvert
- RE: Mailing to email list using CF Ian Skinner
- RE: Mailing to email list using CF Paul Vernon
- Re: Mailing to email list using CF Matt Robertson
- Re: Mailing to email list using CF stylo stylo
- Re: Mailing to email list using CF stylo stylo
- Re: Mailing to email list using ... Kym Kovan
- RE: Mailing to email list us... Michael Kear
- RE: Mailing to email list us... Kym Kovan
- Re: Mailing to email list us... stylo stylo