This is from Anthony Petruzzi, a few posts back - "Pausing CF".  You may
have to convert it to a custom tag if you're not using CF5.

<cfscript>
/**
 * Pauses the processing for CF for a specified amount of time
 *
 * @param seconds  number of seconds you would like to pause CF for
 * @author Tony Petruzzi ([EMAIL PROTECTED]
 * @version 1, April, 09 2002
 */
        function PauseCF(seconds){
                var currenttime = now();
                while(DateDiff("s", currenttime, now()) LTE seconds){
                        continue;
                }
        }
</cfscript>


Here is a function a wrote to do this. All you have to do to use it is
assign the function to a variable.

<cfset temp = PauseCF(10)>

> -----Original Message-----
> From: Willy Ray [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 09, 2002 10:41 AM
> To: CF-Talk
> Subject: RE: Multiple CFMail Problem
>
>
> What do you think would be the best way to add a delay?  Just
> loop through some math a couple thousand times?
>
> Willy
>
> >>> [EMAIL PROTECTED] 04/08/02 11:38AM >>>
> Hi,
>
> Thanks for shedding some light on this subject.  Just for the
> record it is
> not fixed in CF5 as we experience this same behavior you
> described and have
> solved it somewhat by adding in a delay.
>
> Thanks
>
> Chuck Rodgers
>
> At 12:30 PM 4/8/02 -0500, you wrote:
> >We experienced this problem with all versions of 4.5.  Allaire never did
> >'fix' the error.  They claimed it was fixed in 4.5.1, however it still
> >existed, just wasn't as persistent as earlier versions.
> >
> >Our own diagnosis determined that the cause of the error was the
> >cfmail.dll(I forget the actual name of the DLL) was trying to write two
> >files at the same time. Or perhaps more correctly, it would attempt to
> >write the second file before the first was closed.  We would typically
> >end up with 0k files in the undeliverable section.
> >
> >Anyway, adding some pause between the cfmails may solve your problem
> >provided the site isn't terribly active and there aren't too many
> >simultaneous requests to these cfmail calls. We found the size of the
> >emails also greatly affected how often this error would occur.  For
> >example, if you have a page that sends 4 different emails to 4 different
> >contacts at one company and each email contains a 10k attachment, you
> >can start to duplicate this bug with some regularity.  Now imagine that
> >page being hit every 5 seconds... Now, the speed of your server and file
> >system are also going to affect how often this happens.  So, adding
> >pauses and using smaller emails MAY solve your problem depends on how
> >active your site is.
> >
> >Ultimately, our solution was to switch to an alternate means of
> >generating email.  We switched to an ASP product that is actually
> >multi-threaded unlike Allaire/Macromedias solution.
> >
> >For years, I have been suggesting that CF Enterprise be bundled with a
> >robust multi-threaded smtp spooler that should be directly tied to the
> >application engine.  Enterprise sites that deal with high mail loads
> >would benefit from this.  Also, it would add more product disparity
> >between pro and ent, something I personally feel is lacking.
> >
> >I have not tested these same errors (bugs?) in CF 5.  Perhaps it has
> >been corrected, but honestly, if past performance of eliminating mail
> >bugs between revisions is any indication, I would suspect they only
> >added new and more exciting problems ;)
> >
> >Trey Rouse
> >Internet Project Coordinator
> >Web Services - Rice University
> >MS 119 - 713.348.4799
> >
> >PS - I love CFM, I just loath CFMAIL.
> >
> >-----Original Message-----
> >From: Willy Ray [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, April 08, 2002 10:43 AM
> >To: CF-Talk
> >Subject: Multiple CFMail Problem
> >
> >Hey All,
> >
> >Here's my situation.  I have an application that generates 3 total
> >emails.  User clicks submit, it generates one email, then they're taken
> >to another page on which they can submit additional info.  If they do
> >this, two more emails are created, one to the person who is gathering
> >the info, and another back to the user thanking them for sending
> >additional info.
> >
> >My problem is, the middle email doesn't always get sent.  I click the
> >first submit button, I always get the email, I do the additional info,
> >hit submit, and I always get the "thanks for the more info" message, but
> >I only get the "additional info" message if I then hit the back button,
> >and re-click submit!
> >
> >It seems like the time between messages is to short, and I'm getting
> >these additional info messages in my undelivrable folder.  How long do I
> >need to wait between messages, and what's the best way to accomplish the
> >waiting?  two separate templates?
> >
> >Help!
> >
> >Willy Ray
> >
> >
> >
> >-----
> >Willy Ray
> >Web Applications Developer
> >Certified Advanced ColdFusion Developer
> >Westminster College
> >
> >
> >
>
> 
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to