Send mail via cfmail in one connection

I ran into a problem when my mail server accepts only 100 connections to the server every 5 minutes. My current code iterates over my database, calling cfmail for each person in the list. I assume the problem is that I open a new connection every time I use cfmail?

<CFLOOP QUERY="Customer" > <!---send mail to Admin -----> <cfmail to = "#cstEmail#" from = "#FORM.fromAddressEmail#" subject = "#FORM.subjectEmail#" server = "#var.mailserver#" port= "#var.mailport#" username="#var.mailuser#" password="#var.mailpass#" failto="#var.failEmail# type="html" > 

What I encountered was sent only 100 letters at a time, the rest were sent to the cf undelivered folder. I would send them to the reel, and again 100 will pass.

Now, I read in older versions of cf, there is a checkbox in the cf admin to "keep the connection" - it starts cf9 and does not see this option.

Does the cfmail query attribute use, is cfmail forced to connect only to the mail server to send all emails?

 <cfmail query="Customer" from = "#FORM.fromAddressEmail#" to = "#cstEmail#" subject = "#FORM.subjectEmail#"> 

I'm not even sure how to verify this without sending a couple of hundred letters. Any thoughts if this is a viable solution to the problem?

Thank you for your help! Biscotti

+4
source share
2 answers

I ended up compromising with a scheduled task to move files every 5 minutes back to the Spool directory from the Undelivr directory. I am not happy with this solution, but it works.

Thanks to the Russ Respooler extension. http://cfrespooler.riaforge.org/

+1
source

Using the above code to call QUERY inside CFMAIL, I was able to speed up the process on the client side. The mail server still rejected mail after the 100th connection - forcing me to determine that there was no server-side support for this method, simply sorting through CFMAIL, as in my first example. It seems that the only answer is to run the code in the corporate version of the cf environment, in which the "keep connected" function is enabled.

0
source

All Articles