Hi, this one is a corker, I might try to submit it to Rays cookbook if it's
not there.
(If someone hadn't told you by now) you can group with the CFMAIL tag
itself. It's a beautiful thing. So you can group by recipient etc.
It's best to think cfmail is cfoutput.
The ability to output query data back into the cfmail tag is a bit abnormal.
The example below *should* run.
Cheers.
<cfset qryExample = querynew("email,data")>
<cfset queryaddrow(qryExample)>
<cfset querysetcell(qryExample,"email","[EMAIL PROTECTED]")>
<cfset querysetcell(qryExample,"data","record 1")>
<cfset queryaddrow(qryExample)>
<cfset querysetcell(qryExample,"email","[EMAIL PROTECTED]")>
<cfset querysetcell(qryExample,"data","record 2")>
<cfset queryaddrow(qryExample)>
<cfset querysetcell(qryExample,"email","[EMAIL PROTECTED]")>
<cfset querysetcell(qryExample,"data","record 3")>
<cfmail query="qryExample" group="email" to="#email#" from="[EMAIL PROTECTED]"
subject="Your data" type="html">
Your records...<br />
<cfoutput>
#data#<br />
</cfoutput>
</cfmail>
mail sent
-----Original Message-----
From: Brian Polackoff [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 7 February 2006 8:23 AM
To: CF-Talk
Subject: RE: CFMail Grouping Question
Thanks for the ideas, the <cfsavecontent> worked perfectly.
Brian
-----Original Message-----
From: Brad Wood [mailto:[EMAIL PROTECTED]
Sent: Monday, February 06, 2006 4:02 PM
To: CF-Talk
Subject: RE: CFMail Grouping Question
If anything-- you could run that code ahead of the cfmail in a
cfsavecontent tag, and then just output the results into the E-mail.
~Brad
-----Original Message-----
From: Brian Polackoff [mailto:[EMAIL PROTECTED]
Sent: Monday, February 06, 2006 2:33 PM
To: CF-Talk
Subject: CFMail Grouping Question
Can anyone tell a lost programmer how to group with CFMAIL so that a
recordset with 100 records, grouped into 10 groups gets included into a
singe email, not 10 emails
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231629
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54