First clue, you don't need to use CFOUTPUT inside a CFMAIL.  Fields from the
query named in the cfmail tag don't need to be qualified with their query
name, but fields from the other query DO.  In the example below, stuff from
the query named "details" must have the "details." before the field names.

<cfquery name="details">
  SELECT stuff you want to tell people about
</cfquery>
<cfquery name="people">
  SELECT Name, Email
        ...
</cfquery>
<cfmail query="people" to="#Email#" ...>
  Dear #Name#,
Here's some stuff I want to tell you:
   #details.stuff#, #details.morestuff#
</cfmail>

Does that help?

-----Original Message-----
From: Drechsler, Jennifer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 11, 2001 10:42 AM
To: CF-Talk
Subject: CFMAIL Problem


Hi,

I am trying to send dynamic content, selected from one query, using CFMAIL.
It works fine as long as I am sending it to one person.  The problem is I
need this mail sent to a group of people, from a second query.  I can't seem
to nest (or not nest) my CFOUTPUT and CFMAIL statements properly.

Can anyone help?

Thanks,

Jennifer Drechsler
SFPUC, ITS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to