Skip to main content
Known Participant
September 2, 2010
Answered

content attribute on CFMAILPARAM

  • September 2, 2010
  • 1 reply
  • 2000 views

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>

This topic has been closed for replies.
Correct answer JR__Bob__Dobbs

I've been trying to do the update and downloaded from the given link but the error exist. I'm not sure which update do I need? do you mind pointing to the right item?

I downloaded :

ColdFusion 8 Update 1 (8.0.1)

Release date: April 03, 2008

This recommended product update offers ColdFusion customers a simple way to get the latest platform support and applies key fixes that have been put in place since the release of ColdFusion 8. Full details and release notes are available. The ColdFusion 8 Report Builder and other ColdFusion 8 developer tools have also been updated for 8.0.1 and are available as separate downloads. 64 bit installers are available as full kits under Enterprise licensing on the Adobe store. Full details and release notes are available.


What do you mean by "the error exist"?

If you are running CF 8.0 you need to update to 8.0.1 by downloading and installing "ColdFusion 8 Update 1 (8.0.1)". from http://www.adobe.com/support/coldfusion/downloads_updates.html#cf8

You will need to download and run the installer appropriate for your operating system.

1 reply

Inspiring
September 2, 2010

You need the 8.0.1 update installed in order to use the content attribute of CFMAILPARAM.

http://www.adobe.com/support/documentation/en/coldfusion/801/cf801releasenotes.pdf

aleckenAuthor
Known Participant
September 3, 2010

Do I have to do both

ColdFusion 8.0.1 FULL Installation OR pdate installer OR both? I'm not too sure about this can you please advice?

Inspiring
September 3, 2010

To determine which version of CF you have check the system information page in the CF administrator. The system information page can be accessed via the "I" icon at the top right of the CF admin web interface. You need version 8,0,1 to use CFMAILPARAM's content feature.

If you have 8.0 installed you need to get the "ColdFusion 8 Update 1 (8.0.1)" installer to perform the update.

If you need 8.0.1 you can download it at:

http://www.adobe.com/support/coldfusion/downloads_updates.html#cf8