Then run the query first.  Write the results to a var and include the var in
the email.
Like this.

<CFPARAM NAME="foo" DEFAULT="">
<!--- get all the itmes from the query -->
<CFLOOP QUERY="somequery">
        <!--- write them to foo --->
        <CFSET foo = foo & somequery.item & chr(13) & somequery.item2>  etc.
</CFLOOP>

<CFMAIL>
#foo#
</CFMAIL>

Mark Johnson
-----------------------
Senior Cold Fusion Developer
Cardinal Communications

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 21, 2000 8:09 PM
To: CF-Talk
Subject: Re: QUESTION: <CFMAIL> and <CFLOOP>


Hi Mark,

Thanks for getting back on this.  This is basically where I started but I
tried it again in case I missed something my first time around.  But this
yields six separate emails with one record per email.  I need to find a way
to combine them, all six (or how many ever) in one email.

:-)
Oriole

In a message dated 09/21/2000 2:53:54 PM Eastern Daylight Time,
[EMAIL PROTECTED] writes:

<< If you specify QUERY as an attribute of CFMAIL you don't want to put a
loop
 of that same query in cfmail content.  It should be as follows.

 <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

 #Trim(abenakireport.first_name)# #Trim(abenakireport.last_name)#
 #Trim(abenakireport.street)#
 #Trim(abenakireport.city)#, #Trim(abenakireport.state)#
 #Trim(abenakireport.zip)#
 #Trim(abenakireport.phone)#
 </CFMAIL>

 Mark Johnson >>
----------------------------------------------------------------------------
--
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.

------------------------------------------------------------------------------
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.

Reply via email to