Thanks Charlie - Your idea helped me learn more about what is going on.
What I'm trying to do inside of my <cfthread> is have a loop that for each eMail address: . Creates a personalized eMail . Sends the message with <cfmail> . Waits 1000 ms Using <cflog>, I know the thread is starting, but apparently, I am getting some errors that cause the thread to terminate. Before, I was using <cfsavecontent> and <cfinclude> to assemble my personalized eMail message. The message has a header, a body, and a footer and I have a <cfinclude> for each section. But, <cfthread> and <cfsavecontent> don't seem to want to play nice together. I know cfthread can't send output to the page, but that's not what I'm trying to do. I just want to create my personalized message, save it in a variable, and send it out via <cfmail>. I may also have some path problems with the cfincludes, but even when I comment all that out, everything seems to fail right after the <cfsavecontent>. Has anyone experienced these issues? Do you have any suggestions for me? And, one more question. Is there a way to see error messages that get thrown inside of a thread? This is ending up being trickier than I thought. Oh well! Clarke From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Charlie Arehart Sent: Thursday, May 28, 2009 9:02 AM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Sending large numbers of eMail via ColdFusion Clarke, I wouldn't rely on the server monitor as proof of whether the thread runs. For one thing, you have to have "start monitoring" enabled, which isn't on by default. Just thought I'd clarify that if it might be the only reason you don't see them. Even then, the threads could run very fast. I'd recommend instead you go old school, and throw a CFLOG into the thread code (and outside the thread code) to write to a file that you can look at to confirm if it's ever written to. /charlie From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Clarke Bishop Sent: Wednesday, May 27, 2009 5:52 PM To: discussion@acfug.org Subject: RE: [ACFUG Discuss] Sending large numbers of eMail via ColdFusion Thanks for the ideas Troy, Dawn, and Doug! I decided to try out cfthread as my code was already much like what Troy suggested. Here's what I have now: <cfthread name="sendPR" action="run"> <cfloop query="qEmails"> <cfif qEmails.personalized EQ True> <cfset personalMessage = qEmails.message> <cfelse> <cfset personalMessage = ""> </cfif> <cfset sendMail(qEmails.eMail, subjectMsg, personalMessage, Template)> <cfset sleep(1000)> </cfloop> </cfthread> The only thing is the thread doesn't seem to run. The above code is inside a CFC function, and the sendMail() call goes to another method in the same CFC? I saw an example on the web where someone did this, so I think it's OK. Any ideas what I might be doing wrong? Also, are there good ways to trouble-shoot with cfthread. The code runs correctly when I comment out the cfthread tags. But when they are in there, nothing seems to happen. No thread ever shows up in the Server Monitor. Thanks for any pointers! ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by FusionLink <http://www.fusionlink.com> ------------------------------------------------------------- ------------------------------------------------------------- To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -------------------------------------------------------------