Question
attaching file to email
i have a form that i require an individual to upload a file
with. however, i am not putting the attachment in a db, i need it
to simply attach to an html email message. i tried using:
<cfif DirectoryExists( ExpandPath( ".\ResumeFolder\" ) )>
<cffile action="upload"
fileField="resume"
destination="#GetTempDirectory()#"
nameconflict="makeunique"
accept="text/plain,application/msword,application/pdf,application/rtf">
Cover Letter/Resume/Writing Sample: <cfmailparam file="#resume#" />
<cfelse>
<cfdirectory directory="#ExpandPath( ".\ResumeFolder\" )#" action="create">
<cffile action="upload"
fileField="resume"
destination="#GetTempDirectory()#"
nameconflict="makeunique"
accept="text/plain,application/msword,application/pdf,application/rtf">
Cover Letter/Resume/Writing Sample: <cfmailparam file="#resume#" />
</cfif>
however, sometimes the emails will be received on mac computers, sometimes on pc's. i need a method that will not require an absolute path to a folder on the hard drive. is it possible to simply attach a document to an email alone?
<cfif DirectoryExists( ExpandPath( ".\ResumeFolder\" ) )>
<cffile action="upload"
fileField="resume"
destination="#GetTempDirectory()#"
nameconflict="makeunique"
accept="text/plain,application/msword,application/pdf,application/rtf">
Cover Letter/Resume/Writing Sample: <cfmailparam file="#resume#" />
<cfelse>
<cfdirectory directory="#ExpandPath( ".\ResumeFolder\" )#" action="create">
<cffile action="upload"
fileField="resume"
destination="#GetTempDirectory()#"
nameconflict="makeunique"
accept="text/plain,application/msword,application/pdf,application/rtf">
Cover Letter/Resume/Writing Sample: <cfmailparam file="#resume#" />
</cfif>
however, sometimes the emails will be received on mac computers, sometimes on pc's. i need a method that will not require an absolute path to a folder on the hard drive. is it possible to simply attach a document to an email alone?
