Dynamo3209
Programmer
Hi,
I have a routine to upload upto three files to the server and then email these files the code I am using for uploading the files is
now I have to email these files as attachements for which I am suing the following code
The mail is being sent properly however the files are also being attached however the file names are the ones generated by coldfusion while uploading the files (neotmp30448.tmp) how do I get the proper filenames.
I have tried using #serverfilename#.#serverfileext#, but that doesn't seem to work or I am not using it properly.
Appreciate any help in this regard.
Thanks,
Dynamo
I have a routine to upload upto three files to the server and then email these files the code I am using for uploading the files is
Code:
<cfset filename = "">
<cfloop index="i" from="1" to="3" step="1">
<cfif Len(Trim(form["file" & i]))>
<cffile action="UPLOAD"
destination="/[URL unfurl="true"]www/htdocs/abc/report_files/"[/URL]
nameconflict="MakeUnique"
filefield="file#i#">
<cfset filename = ListAppend(filename, cffile.serverFile)>
</cfif>
</cfloop>
now I have to email these files as attachements for which I am suing the following code
Code:
<cfmail to="abc@yahoo.com"
from="a@c.com"
bcc="b@c.com"
subject="Results - #FORM.SkipName#, #FORM.AcctNum#, #FORM.SSN1#-#FORM.SSN2#-#FORM.SSN3#"
spoolenable="false"
type="HTML"
Server="mailcf.c.net"
Port = "25">
<cfif isDefined ("FORM.File1")>
<cfmailparam file= "#FORM.File1#">
</cfif>
<cfif isDefined ("FORM.File2")>
<cfmailparam file= "#FORM.File2#">
</cfif>
<cfif isDefined ("FORM.File3")>
<cfmailparam file= "#FORM.File3#">
</cfif>
The mail is being sent properly however the files are also being attached however the file names are the ones generated by coldfusion while uploading the files (neotmp30448.tmp) how do I get the proper filenames.
I have tried using #serverfilename#.#serverfileext#, but that doesn't seem to work or I am not using it properly.
Appreciate any help in this regard.
Thanks,
Dynamo