Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFMail Timing out - Is this the most efficient way? 1

Status
Not open for further replies.

wilcoHead

Programmer
Feb 2, 2005
85
0
0
I have a weekly mailer that goes out to over 1000 contacts. When I send this I am getting a CFMAIL timeout error:

------------------------------------------
"The request has exceeded the allowable time limit Tag: cfmail"
-------------------------------------------

I am using an access DB - My quesstion is, what is the fastes way to loop oveer the contacts and send out the e-mails without getting a timeout error?



-------------------------------------------
The Code
-------------------------------------------
<CFQUERY NAME="GetMailContacts" DATASOURCE="#request.dsn#" DBTYPE="ODBC">
SELECT *

FROM MailTable

</CFQUERY>
<CFMAIL
QUERY="GetMailContacts"
TO="#GetMailContacts.EmailFld#"
FROM="me@mysite.com"
SUBJECT="Weekly Mailer"
timeout="300">

<cfmailpart
type="text"
wraptext="74">
You are reading this message as plain text, because your mail reader
does not handle HTML text.
</cfmailpart>

<cfmailpart
type="html">
<---HTML Newsletter Here --->
</cfmailpart>
</CFMAIL>
-------------------------------------------------------

Thanks for your input;
WilcoHEAD
 
You don't need to alter the timeout in the CFAdmin, you can do it from within the script itself so it isn't a global change:

Code:
<cfsetting RequestTimeout = "999">

Hope this helps

Wullie

Fresh Look - Quality Coldfusion/Windows Hosting

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Wullie;

Where would I place that anywhere on the page?

Thanks for your input;
WilcoHEAD
 
Thanks, I will try it!

Thanks for your input;
WilcoHEAD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top