Yup.. the error is in the CFMAIL tag... you're including the QUERY
parameter, which will send a copy to every address in the query maillist.

So every time you loop through the maillist query, you are also sending a
copy to every member in the list!

Nick


> From: Michael Kear <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Wed, 5 Jul 2000 10:04:31 +1000 (EST)
> To: [EMAIL PROTECTED]
> Subject: <CFMAIL> I really goofed here - but where?
> 
> Uh oh,  I've really goofed here, but I'm not sure where I went wrong.  I
> sent out a newsletter to several thousand subscribers last night, but
> instead of everyone getting one copy, they got dozens.   To one address, I
> got 30copies, and to another I got 65!!   There must be a logic error but
> I can't see where ..
> 
> Since there are thousands on the list, if CF was looping though the entire
> list at each point, then surely I'd have got thousands of copies.  I
> stopped the server when the first phone call came in, and the database
> shows that down to number 292 got the message.  However my own email
> address is at number 2953.  So the whole list must have got several
> copies.
> 
> Can anyone see the fault?  Please?
> 
> 
> Here's the shortened version of the action template:
> 
> <!---- Gets the list to send to -------->
> <!---- messagesent is a flag to show the address has already received a
> message ---->
> <cfquery name="maillist" datasource="whatever">
> SELECT      *
> FROM         dbo.majordomo
> where messagesent = '0'
> Order by memberid
> </cfquery>
> 
> <!---- Sending the message -------->
> 
> <cfloop query="maillist" startrow="1">
> 
> <!---- Transaction to make sure if the message isnt sent the flag isnt set
> ----->
> 
> <cftransaction> 
> <!---- Update the  mailing list message sent flag and time ------>
> <cfquery NAME="setyes" DATASOURCE="whatever">
> update majordomo set
> messagesent='1',
> messagesentwhen=#createodbcdatetime(Now())#
> where memberid='#maillist.memberid#'
> 
> </cfquery>
> 
> <!---- send the message --------->
> 
> <cfmail query="maillist" to="#emailaddy#" from="#form.from#"
> subject="#form.subject#" timeout=60>
> #form.messagetogo#
> #form.Disclaimer#
> </cfmail>  
> 
> 
> <!-------  add a loop to force the mail server to pause slightly to allow
> the shop to get a word in edgeways if it wants to process a transaction
> ---------->
> 
> 
> <cfloop index="x" from="1" to="10000"></cfloop>
> 
> </cftransaction>
> </cfloop>  
> 
> 
> 
> I'm in deep doodoo over this and I can't see what's wrong with my
> template.
> 
> Cheers,
> Mike Kear
> AFP Web Development
> Windsor, NSW, Australia
> 
> ------------------------------------------------------------------------------
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
> send a message to [EMAIL PROTECTED] with 'unsubscribe' in the
> body.

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to