CFMAIL tag itself. We also validate very heavily before inserting any email
addresses (including the same RE test we use at send time). There the focus
is on identifying errors and giving meaningful messages. At send time, it's
just to kick out the bad ones. It seems foolish from the outside, but the
nature of the communication we do has zero room for errors, so we pay the
price of revalidation, just to be safe. We've discovered a couple chinks in
the input validation "armor" (amazingly subtle ones) that we were saved from
by the send-time checking, so it's worth it.
Cheers,
barneyb
> -----Original Message-----
> From: Burns, John D [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 25, 2004 12:42 PM
> To: CF-Talk
> Subject: RE: Mailing to email list using CF
>
> 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]

