Example: Another option is to send the results as an attachment
<!---
output query results to a variable . format as HTML table
--->
<cfsavecontent variable="htmlData">
<table>
<cfoutput query="yourQuery">
<tr><td>#SomeQueryColumn#</td>
<td>#OtherColumn#</td>
</tr>
</cfoutput>
</table>
</cfsavecontent>
<!---
send as email attachment
--->
<cfmail to="somebody@company.com" from="somebody@company.com
<cfmailparam file="queryResults.html" content="#htmlData#">
...
</cfmail>
Main Topics
Browse All Topics





by: _agx_Posted on 2009-08-25 at 13:33:02ID: 25181934
If the query is not to large, you could email it as a basic html table. Another option is to send the results as an attachment (like a text file). But it depends on your requirements.
coldfusion /8/htmldoc s/Tags_m- o _01.html " subject="Query" type="html">
http://livedocs.adobe.com/
<cfmail to="somebody@company.com" from="somebody@company.com
<table>
<cfoutput query="yourQuery">
<tr><td>#SomeQueryColumn#</td>
<td>#OtherColumn#</td>
</tr>
</cfoutput>
</table>
</cfmail>