Three emails sent with one record each
Hi all there are three records that result from the query but instead of sending all three results in the email it sends three emails with one record each. I can't use cfoutput in the cfmail tag. What do I do? Thanks
<cfquery name="qNames" datasource="salesdb">
select * from company, industries, division
where Date(company.meeting) = '#DateFormat(Now(),"yyyy-mm-dd")#'
and company.SECTORS1 = industries.SECTORSIDS
and division.DEPARTMENTIDS = company.DEPARTMENT1
ORDER BY company</cfquery>
<cfmail to="barney@bedrock.com"
from=barney@bedrock.com
subject="Today's email"
type="text"
query="qNames">
Dear Fred
#company#
#sectorsnom#
</cfmail>