content attribute on CFMAILPARAM
I thought with CF 8 we could generate email and attach a PDF on the fly but mine got an error saying (see below)
Did I miss something???
Please help!
Attribute validation error for tag CFMAILPARAM. | |
| The tag does not allow the attribute(s) CONTENT. The valid attribute(s) are CONTENTID,DISPOSITION,FILE,NAME,TYPE,VALUE. | |
| The error occurred in C:\Inetpub\wwwroot\scratch\QAS_Web\badaddressReport.cfm: line 177 | |
175 : outgoing email. 176 : ---> 177 : <cfmailparam file="certificiate.pdf" type="application/pdf" content="#certificate#"/> 178 : 179 : |
here is my simple codes:
<cfdocument
name="certificate" format="PDF" pagetype="custom" pageheight="5" pagewidth="6.5" margintop="0" marginbottom="0"
marginright="0" marginleft="0" unit="in" fontembed="true" backgroundvisible="true" localurl="true">
<cfquery name="GtEmpContacts" datasource="#app.dsn#">
Select FN,LN,Dept,Ph,Eml from emp_table
</cfquery>
<cfoutput>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
</head>
<body>
<table border="0">
<tr><td>id</td>
<td>Employee First Name</td>
<td>Employee Last Name</td>
<td>Department</td>
<td>Phone</td>
<td>Email</td>
</tr>
<cfloop query="GetEmpContacts">
<tr>
<td>#id#</td>
<td>#FN#</td>
<td>#LN#</td>
<td>#Dept#</td>
<td>#Ph#</td>
<td>#Eml#</td>
</tr></cfloop>
</table>
</body>
</html>
</cfoutput>
</cfdocument>
<cfmail
to=alk@yahoo.com from="info@certificiates.com" subject="Contacts Information" type="html">
Here is the new employee contact info
<cfmailparam file="certificiate.pdf" type="application/pdf" content="#certificate#"/> ---->????
</cfmail>
