Hi Everyone,
I am trying to send an email with a pdf attachment, but I keep getting the following error message. I can figure out what i am doing wrong. I know it must be something simple (I hope!)
Error Message
Unable to attach file.
Cannot attach 'Cleveland Flipping Rules.pdf' to the mail message. The file does not exist.
The error occurred while processing an element with a general identifier of (CFMAIL), occupying document position (23:1) to (26:38).
Code Page
<CFIF #Form.Filename# IS NOT "">
<cffile action="UPLOAD"
filefield="Form.Filename"
destination="D:\inetpub\ Guidelines\ORTBulletins"
nameconflict="OVERWRITE">
<cfset Form.Filename = "#cffile.serverFile#">
<CFELSE>
<cfset Form.Filename = "NA">
</cfif>
<!---inserts bulletin file into ortbulletins table --->
<cfset Date = #CreateODBCDate(DateFormat(Now()))#>
<cfquery name="AddORT" datasource="underwriting" dbtype="ODBC">
INSERT INTO ORTBulletins(Name, Filename, BulletinDate, uploaded_date)
VALUES('#FORM.Name#', '#FORM.Filename#', '#FORM.BulletinDate#', #Date#)
</cfquery>
<cfmail
from = "patc@accudatasearch.com"
to = "susanh@accudatasearch.com"
subject = "Subject #Form.Name#">
<cfmailparam file = "#cffile.serverFile#">
</cfmail>
I am trying to send an email with a pdf attachment, but I keep getting the following error message. I can figure out what i am doing wrong. I know it must be something simple (I hope!)
Error Message
Unable to attach file.
Cannot attach 'Cleveland Flipping Rules.pdf' to the mail message. The file does not exist.
The error occurred while processing an element with a general identifier of (CFMAIL), occupying document position (23:1) to (26:38).
Code Page
<CFIF #Form.Filename# IS NOT "">
<cffile action="UPLOAD"
filefield="Form.Filename"
destination="D:\inetpub\ Guidelines\ORTBulletins"
nameconflict="OVERWRITE">
<cfset Form.Filename = "#cffile.serverFile#">
<CFELSE>
<cfset Form.Filename = "NA">
</cfif>
<!---inserts bulletin file into ortbulletins table --->
<cfset Date = #CreateODBCDate(DateFormat(Now()))#>
<cfquery name="AddORT" datasource="underwriting" dbtype="ODBC">
INSERT INTO ORTBulletins(Name, Filename, BulletinDate, uploaded_date)
VALUES('#FORM.Name#', '#FORM.Filename#', '#FORM.BulletinDate#', #Date#)
</cfquery>
<cfmail
from = "patc@accudatasearch.com"
to = "susanh@accudatasearch.com"
subject = "Subject #Form.Name#">
<cfmailparam file = "#cffile.serverFile#">
</cfmail>