what if you

<cfquery name=blah datasource="dsn">
select * from wherever
</cfquery>

<cfoutput query=blah>
<cfmail tag>
</cfmail>
</cfoutput>

or

<cfmail to="<cfoutput query=blah>#emailaddress#,</cfoutput>"
from,server,subject>
text
</cfmail>

won't it then repeat until it reaches the end?
Thanks,
Tony Hicks
Professionally Designed Websites
     http://www.righteousdesigns.com
ICQ: 5874143 AIM: Webmigit Y!: Webmigit
     mailto:[EMAIL PROTECTED]
Tired of your web host?
     http://www.nextmill.net
Need a Domain? Don't have a credit card?
     http://www.domainsbycheck.com
Got your Free Online Business Card Yet?
     Here's mine: http://thecardfile.com/webmigit.htm
----- Original Message -----
From: "Jamie Smith" <[EMAIL PROTECTED]>
To: "CF-Server" <[EMAIL PROTECTED]>
Sent: Monday, December 11, 2000 2:44 PM
Subject: CF server 4.0 and duplicating mail.


> I am experiencing an issue where
> I query a SQL database for a record
> set of about 1300 and then send out
> an email to each address on the list
> and one to myself.
>
> I use
>
> <cfloop query="thequery">
>
> to loop over the result set
> and then an inner loop to
> send each email to the email in the
> recordset and to me.
> <cfloop list="[EMAIL PROTECTED],#thequery.email#" delimiters=",">
>
> I then put in my
> cfmail tag...
> What happens is that instead of sending out
> 1300 emails It seems to duplicate the
> entire list repeatedly.  I finally
> stopped when the SPOOL directory hit 15000
> emails.
>
> I tested the query and nested loops by
> remming out the <CFMAIL> in its entirety
> and adding a couple of counters to see if
> the loops were replicating, but they weren't.
>
> anyhow.  any help would be appreciated.
> I have enclosed the code.
>
> -----------Code Starts Here-----------
>
> <cfquery name="qryEmailList" datasource="DSN_EpicResorts">
> SELECT [key] as Seed, FirstName, LastName, Address, City, State, Zip,
> EmailAddress
> FROM [dbo].[EmailListBase]
> ORDER BY [key]
> </cfquery>
>
>
>
> <cfset count1 = 0>
> <cfset count2 = 0>
>
> <cfloop query="qryEmailList">
>
> <cfset count1 = count1 + 1>
>
> <cfoutput>#count1#</cfoutput>
>
> <!-- Send User Invite email for EmailList -->
> <cfloop INDEX="ListElement" LIST="[EMAIL PROTECTED]" delimiters=",">
>
> <cfset count2 = count2 + 1>
> <cfoutput>#count2#</cfoutput>
>
>
> <cfmail to="#ListElement#" from="[EMAIL PROTECTED]" subject="EmailList"
> server="smtp.mailserver.net">
> This newsletter is never sent unsolicited.
> You are receiving this e-mail because you
> signed up for the  e-mail newsletter.
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with 
'unsubscribe' in the body or visit the list page at www.houseoffusion.com

Reply via email to