that's not a bug, it's a feature. 

CFMAIL is designed to send one email per line of query when using the QUERY attribute.

you have to build the body of the mail outside the CFMAIL tag to use it in the way you 
wish.

christopher olive
cto, vp of web development, vp it security
atnet solutions, inc.
410.931.4092
http://www.atnetsolutions.com


-----Original Message-----
From: Tristram Charnley [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 10:58 AM
To: CF-Talk
Subject: cfmail query acting strange


I always thought cfmail with the query attribute acted like <cfoutput
query...> What am I doing wrong all of a sudden?  CFMAIL is sending multiple
separate emails, one for each record in the query, rather than multiple
records in the one email.

Whats happened?

<cfquery name="GetPubs" datasource="#variables.database#">
SELECT item_Id,Headline
FROM Publications
WHERE Item_ID IN (#form.item_id#)
Order By Item_ID
</cfquery>

<cfmail to="x"
       from="y"
       subject="Publication request"
       query="GetPubs"
        type="HTML">

<table width="400">
<tr><td>Item</td><td>Publication</td></tr>

<tr><td>#Item_id#</td><td>#Headline#"td></tr>

etc etc
</table>
</cfmail>

Tristram Charnley
---------------------------
[EMAIL PROTECTED]
Allaire Certified ColdFusion Developer




______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to