Ask a Question related to Macromedia ColdFusion, Design and Development.
-
michaelmuller #1
sending multiple emails
I am re-writing code that sends an email out to whoever has subscribed to a
particular page on my sites. The problem is there's three ways to do it, and
the info is kept in three different tables in the db (different levels of
interest in the content: all content on the whole site, just for a particular
set of pages, or just this one page). In the past I would just generate a
giant BCC list from all three sources and remove dupes before running the
cfmail tag. However, I've found that this is very unreliable. A single bad
email could stop the sending of the whole list, or stop the sending from the
bad address on in the list. So I'm rewriting this section of the code. I could
cfloop through the giant list, but I imagine launching CFMAIL potentially
hundreds of times would make for a VERY slow posting time. I'd prefer to use
the query results, but the three queries can't be combined into one query at
runtime, so I'd still have to launch CFMAIL three times. Not so bad, but still
I'd prefer to do it just once. So I guess my question is this: is it worth the
CPU time to try to combine the three query record sets into one record set
(after they run individually) and run CFMAIL once, or just run CFMAIL three
times and be done with it? This is one of the more popular features of the
site so this code would be hit rather frequently.
michaelmuller Guest
-
CFMAIL sending two emails
Sounds like you are experiencing a different problem than I was... -
CFMAIL sending two emails
2nd attempt to post this. I hope they plan on improving these forums. They use to be great! Ok, I've turned 'Spool mail messages for delivery'... -
CFMAIL sending two emails
I'm going to give these suggestions a try now. The weird thing for me is it is only sending double emails to the cc recipient. Thanks guys. -
CFMAIL sending two emails
My problems went away by disabling the 'use mail spooler' option in the CF administrator. Have you tried this? Oddly, my double email problem is... -
CFMAIL sending two emails
I'm having this same problem as well on a standard Win 2000 server. CF MX 6.1. Any advice would be appreciated. -
blewis #2
Re: sending multiple emails
I've used CFMAIL to send thousands messages, each with a separate call to
CFMAIL (looping). i had to do this because each message is personalized. The
issue is not really CFMAIL, but the server on which it runs and the SMTP
server. If they are decent and can handle the load, then this approach is no
big deal. A few thousand messages go out on my box in less than a minute. I
would suggest doing a little testing if that is feasible on your system.
Unless your machine is under load, I don't think you will notice much
difference between all three methods.
Bryan
blewis Guest
-
mpwoodward *TMM* #3
Re: sending multiple emails
michaelmuller wrote:
We have an email marketing app that sends sometimes thousands of emails> I am re-writing code that sends an email out to whoever has subscribed to a
> particular page on my sites. The problem is there's three ways to do it, and
> the info is kept in three different tables in the db (different levels of
> interest in the content: all content on the whole site, just for a particular
> set of pages, or just this one page). In the past I would just generate a
> giant BCC list from all three sources and remove dupes before running the
> cfmail tag. However, I've found that this is very unreliable. A single bad
> email could stop the sending of the whole list, or stop the sending from the
> bad address on in the list. So I'm rewriting this section of the code. I could
> cfloop through the giant list, but I imagine launching CFMAIL potentially
> hundreds of times would make for a VERY slow posting time. I'd prefer to use
> the query results, but the three queries can't be combined into one query at
> runtime, so I'd still have to launch CFMAIL three times. Not so bad, but still
> I'd prefer to do it just once. So I guess my question is this: is it worth the
> CPU time to try to combine the three query record sets into one record set
> (after they run individually) and run CFMAIL once, or just run CFMAIL three
> times and be done with it? This is one of the more popular features of the
> site so this code would be hit rather frequently.
>
(opt-in, not spam ...) and I send each e-mail individually in a loop
that calls cfmail for each iteration. It does take some time to run
this process but since this is something that runs behind the scenes (at
least I'm assuming), is that a problem?
I'd at least do some tests in your environment and see how it performs.
I've been very surprised at just how fast cfmail is, particularly if
you have a speedy mail server (and even speedier if you're running CF
Enterprise).
Matt
--
Matt Woodward
Team Macromedia - ColdFusion
mpwoodward *TMM* Guest
-
michaelmuller #4
Re: sending multiple emails
I can't afford a full minute to post. These are website community members
posting messages and files, etc, with an email alert going out. If, upon
clicking the submit button, it takes a full minute for the page to come back
they'll think the site is broken and they'll click the button again. I found
a udf that merges queries and am trying that. I think this'll be a little
faster than lopoing around a cfmail. Perhaps we could run a test? Vroom vroom!
michaelmuller Guest
-
mpwoodward *TMM* #5
Re: sending multiple emails
michaelmuller wrote:
Either that or don't send the emails right when someone updates the> I can't afford a full minute to post. These are website community members
> posting messages and files, etc, with an email alert going out. If, upon
> clicking the submit button, it takes a full minute for the page to come back
> they'll think the site is broken and they'll click the button again. I found
> a udf that merges queries and am trying that. I think this'll be a little
> faster than lopoing around a cfmail. Perhaps we could run a test? Vroom vroom!
>
page. Sounds like this would be a good candidate for storing the fact
that the page was updated in the background and running a scheduled job
to send out the emails every few minutes. Sometimes doing things
literally in real time can be more trouble than it's worth if true
real-time notifications aren't essential.
Matt
--
Matt Woodward
Team Macromedia - ColdFusion
mpwoodward *TMM* Guest
-
michaelmuller #6
Re: sending multiple emails
The querymerge() udf I found on cflib doesn't work, or at least I can't get it
to work and I'm too tired right now to write my own, so maybe I'll just make a
list for the time being and loop over it. If anyone out there knows of a tag
or udf that merges two queries please let me know. I'm surprised it's not built
into CF. Hey, Macromedia. Modify CFMAIL in the next update (if 7 doesn't
already do this) that will accept a list and a structure as well as a query.
Email is still the #1 killer app. Build in advanced checking as well (query
the receiving mail server if the account is valid).
michaelmuller Guest



Reply With Quote

