Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Bill #1
PAUSE CFMAIL
Hi All
Have a need to pause the mail send using cfmail for a short period (15 sec)
after every 200 emails sent. A fellow pointed out this
<cfset thread = CreateObject("java", "java.lang.Thread")>
About to sleep for 5 seconds...<cfflush>
<cfset thread.sleep(5000)>
Done sleeping.
My question is how do I apply it??
Do I add this to the mail tag??
I'm using CF7 and the mail tag like this
<cfmail query="rsMyMailQuery"
from="#My@name.com#"
subject="#txtSubject#"
to="#Your@name.com#"
server="#MailServer#"
timeout="9000"
replyto="#My@name.com#"
failto="#Support@name.com#">
Any pointers would be greatly appreciated
Bill
Bill Guest
-
<cfmail></cfmail> in a script
I am wondering if I can put <cfmail> tags and code within a javascript script. will the browser recognize it, and perform the instructions? ... -
cfmail and pause
hi, i am on a shared hosting server and they have limits for sending bulk emails. I found this code and it seems to do the pause nicely, but... -
cfmail - Attribute validation error for tag CFMAIL.
I'm getting the error ' Attribute validation error for tag CFMAIL.' on the code below. All its doing is outputting a text string to the TO: field. ... -
Pause a gif
I am making a screen in Director 7 for children at school to investigate buttons. I want to have a screen with still gifs and when buttons are... -
pause all
The following pause action: function funcAll(mc, func) { mc.func = func; mc.func(); for (childMC in mc) { if (typeof (mc) == "movieclip") {... -
mpwoodward *TMM* #2
Re: PAUSE CFMAIL
On 2005-06-04 00:41:53 -0500, "Bill" <bill.betournay<SpamTrap>@gmail.com> said:
The gist of how you would apply this would be to do a check for the> Hi All
>
> Have a need to pause the mail send using cfmail for a short period (15
> sec) after every 200 emails sent. A fellow pointed out this
>
> <cfset thread = CreateObject("java", "java.lang.Thread")>
> About to sleep for 5 seconds...<cfflush>
> <cfset thread.sleep(5000)>
> Done sleeping.
current query row in your cfmail loop and if it's divisible by 200, run
that code. I can't test this right this second but something like this
should work:
<cfmail query="myquery" from="whatever" to="whatever">
Mail content goes here.
<cfif myquery.CurrentRow MOD 200 EQ 0>
<!--- stick sleep code in here --->
</cfif>
</cfmail>
If that current row stuff doesn't seem to do the trick you could also
just stick a simple counter in your cfmail tag and increment it on each
pass.
Hope that helps,
Matt
--
Matt Woodward
[email]mpwoodward@gmail.com[/email]
Team Macromedia - ColdFusion
mpwoodward *TMM* Guest
-
Bill #3
Re: PAUSE CFMAIL
Hi mpwoodward
Thanks for the reply.
I just now saw your reply and haven't tested it yet. You're saying that this
example will pause at the end of every 200 mails sent and resume the send
process with the vary next record pulled from the db. If I have 5000 email
addresses being queried they will all get sent and no email address will
receive two newsletters.
I need to make sure because I have no means of testing unless I create a
deplicate db table with several hundred records of my own email address. I
only have a live db for testing.
Bill
"mpwoodward *TMM*" <mpwoodward@gmail.com> wrote in message
news:d7sge3$2u7$1@forums.macromedia.com...> On 2005-06-04 00:41:53 -0500, "Bill" <bill.betournay<SpamTrap>@gmail.com>
> said:
>>>> Hi All
>>
>> Have a need to pause the mail send using cfmail for a short period (15
>> sec) after every 200 emails sent. A fellow pointed out this
>>
>> <cfset thread = CreateObject("java", "java.lang.Thread")>
>> About to sleep for 5 seconds...<cfflush>
>> <cfset thread.sleep(5000)>
>> Done sleeping.
> The gist of how you would apply this would be to do a check for the
> current query row in your cfmail loop and if it's divisible by 200, run
> that code. I can't test this right this second but something like this
> should work:
>
> <cfmail query="myquery" from="whatever" to="whatever">
> Mail content goes here.
> <cfif myquery.CurrentRow MOD 200 EQ 0>
> <!--- stick sleep code in here --->
> </cfif>
> </cfmail>
>
> If that current row stuff doesn't seem to do the trick you could also just
> stick a simple counter in your cfmail tag and increment it on each pass.
>
> Hope that helps,
> Matt
> --
> Matt Woodward
> [email]mpwoodward@gmail.com[/email]
> Team Macromedia - ColdFusion
>
Bill Guest
-
MattRobertson #4
Re: PAUSE CFMAIL
The problem with using any sleep tag is it ties up a ColdFusion process. Since
you only have so many processes available to handle your traffic, this may may
not be so bad or it may be a disaster depending on server load and
configuration. Also this is going to be one LONG running request... You will
need to build in some sort of failure recovery for if it bombs out in the
middle of the run for some reason.
My longtime solution to this has been to run mail through a "trickler". Its
never failed me. Not so long ago I built failure recovery into it.
[url]http://mysecretbase.com/Slowing_Down_CFMail_2004.cfm[/url]
--Matt--
MSB Web Systems... [url]http://mysecretbase.com[/url]
"When in doubt, mumble.
When in trouble, delegate.
When in charge, ponder."
- Senator. David Boren
MattRobertson Guest
-
Bill #5
Re: PAUSE CFMAIL
Now that is exactly what I was looking for. You're the best Matt. Thanks you
so much.
Bill
"MattRobertson" <theking@mysecretbase.com> wrote in message
news:d85h8u$cn2$1@forums.macromedia.com...> The problem with using any sleep tag is it ties up a ColdFusion process.
> Since
> you only have so many processes available to handle your traffic, this may
> may
> not be so bad or it may be a disaster depending on server load and
> configuration. Also this is going to be one LONG running request... You
> will
> need to build in some sort of failure recovery for if it bombs out in the
> middle of the run for some reason.
>
> My longtime solution to this has been to run mail through a "trickler".
> Its
> never failed me. Not so long ago I built failure recovery into it.
>
> [url]http://mysecretbase.com/Slowing_Down_CFMail_2004.cfm[/url]
>
> --Matt--
> MSB Web Systems... [url]http://mysecretbase.com[/url]
> "When in doubt, mumble.
> When in trouble, delegate.
> When in charge, ponder."
> - Senator. David Boren
>
>
Bill Guest



Reply With Quote

