This is the only solution that worked for me when there are tons of email.
Actually its not my solution, it was Tony Aly's solution and it works great.
<!--- First we pull the specific addressees--->
<cfquery name="get_email_addresses" datasource="#attributes.dsn#"
dbserver="#attributes.dbserver#" dbname="#attributes.dbname#"
username="#attributes.dbusername#" password="#attributes.dbpassword#">
THIS QUERY RETURNS THE PEOPLE YOU ARE SENDING TO
</cfquery>
<!--- Then we use CFX_WAIT to pause between ever iteration of sending it
out --->
<cfloop query="get_email_addresses">
<cfset current_email = trim(lcase(email))>
<cftry>
<cfmail to="#trim(current_email)#"
from="#trim(get_email_message.from_vc)#"
subject="#trim(get_email_message.subject_vc)#"
server="#trim(attributes.mail_server)#">#get_email_message.message_mem#
.
</cfmail>
<CFX_Wait Sleeptime="1">
<cfcatch>
<CFX_Wait Sleeptime="10">
</cfcatch>
</cftry>
</cfloop>
Over the last 2 years we have tried everything imaginable in CF to
accomplish the same task and this is the only solution that has worked for
us.
You can get CFX_WAIT int the tag gallery in Allaire's Developer Exchange.
http://devex.allaire.com/developer/gallery/SearchResults.cfm?keywords=CFX_WA
IT&search=search
Hope that helps,
Sean Renet
----- Original Message -----
From: "Tim Price" <[EMAIL PROTECTED]>
To: "Fusebox" <[EMAIL PROTECTED]>
Sent: Thursday, May 03, 2001 4:40 PM
Subject: CFMAIL
> Has anyone had any trouble with <CFMAIL> running on CF 4.5 server ?
>
> I find that if I try and send more than 1 mail (as you would want to do
> after taking the time and effort to write the program !) it crashes the
> server !!!!!!
>
> Anyone got any ideas before I have no more hair left to pull out ?
>
> Thanx in advance
>
> Tim Price
> Paceway Solutions Ltd.
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists