Oriole,
The key to doing this is to build the content of the body of your email
before (i.e. OUTSIDE) of the CFMail. Something like this might work:
<!--- initialize your message body to be empty --->
<cfset MsgBody = "">
<!--- construct a carriage return and line feed --->
<cfset CRLF = Chr(13) & Chr(10)>
<!--- now build the email body content by outputting the query in a
CFLoop --->
<CFLOOP QUERY="abenakireport">
<cfset MsgBody = MsgBody & Trim(abenakireport.first_name) & " " &
Trim(abenakireport.last_name) & CRLF & Trim(abenakireport.street) &
CRLF & Trim(abenakireport.city) & ", " & Trim(abenakireport.state) &
CRLF & Trim(abenakireport.zip) & CRLF & Trim(abenakireport.phone) & CRLF
& CRLF>
</CFLOOP>
<!--- now create the email --->
<CFMAIL TO="[EMAIL PROTECTED]"
FROM="[EMAIL PROTECTED]"
SUBJECT="Abenaki report"
SERVER="mail.marksport.com">
Here is a list of subscribers requesting a free copy of Saltwater Fly
Fishing.
Requests were made between #FORM.startdate# and #FORM.enddate#.
Name
Address
Phone number
<CFOUTPUT>#MsgBody#</CFOUTPUT></CFMAIL>
This is untested, but you should get the idea.
Hope that helps.
Chris Montgomery [EMAIL PROTECTED]
Web Development & Consulting http://www.astutia.com
Allaire Consulting Partner & NetObjects Reseller
210-490-3249/888-745-7603 Fax 210-490-4692
Allaire Software Sale! http://www.astutia.com/store
Find a Job in San Antonio http://www.sajobnet.com
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, September 21, 2000 1:31 PM
>To: CF-Talk
>Subject: QUESTION: <CFMAIL> and <CFLOOP>
>
>
>Hi all,
>
>I am having a problem getting email results from a query. I
>need to send a
>report of subscribers to a magazine. For security reasons I
>want to send one
>email per query. Originally, without a loop, if the query yielded six
>records six separate emails were sent. This is not
>acceptable. So I added a
>loop. Now all six records are in one email -- six times!
>What am I missing?
> Help!!
>
>Here's the code I have so far:
>
><CFMAIL QUERY="abenakireport"
> TO="[EMAIL PROTECTED]"
> FROM="[EMAIL PROTECTED]"
> SUBJECT="Abenaki report"
> SERVER="mail.marksport.com">
>
>Here is a list of subscribers requesting a free copy of
>Saltwater Fly Fishing.
> Requests were made between #FORM.startdate# and #FORM.enddate#.
>
>
>
>
>Name
>Address
>Phone number
>
><CFLOOP QUERY="abenakireport">
>#Trim(abenakireport.first_name)# #Trim(abenakireport.last_name)#
>#Trim(abenakireport.street)#
>#Trim(abenakireport.city)#, #Trim(abenakireport.state)#
>#Trim(abenakireport.zip)#
>#Trim(abenakireport.phone)#
>
>
></CFLOOP> </CFMAIL>
>
>
>Thank you so much for all of your ideas.
>:-)Oriole
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
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.