cfmail attachment
I am trying to include an attachemnt in cfmail, for the first time.
Reviewing some of the online documentation and techniques, I found this easy one - I could not get it to work using variables so I hardcoded and it works.
<cfmail to=user1@email.com
from="#form.customerEmail#"
subject="Garage Sale
mimeattach="E:\wwwroot\folder1\forms\uploadFolderName\fileName.gif"
type="html">
A couple of questions :
The email has a body of text and it adds the atttachment before the text. What do I have to do to get the attachement after the text ?
Also, my form contains this : <td>Attachment: </td><td><input type="file" name="attachmentFile"></td>
Instead of hardcoding, how do I get the variable in there ? I tried to use the code below but it kept blowing up in the destination part (what I have in there now, I was just trying different things)
<cffile action="upload"
filefield="attachmentFile"
destination="#uploadFile##attachmentfile#"
nameconflict="makeunique">
