Link to home
Start Free TrialLog in
Avatar of acx
acxFlag for United States of America

asked on

CFMail & attachment

Hi,

I'm having a slight problem with attaching file.  Basically, I'm doing a simple form so people can write me and attachment files along with it (such as JPG or DOC or what-not).  I can get the mail to send perfectly fine, but the file for attachment always ends up with a *.TMP extension.  Can anyone help me out here?

I've tried two ways:
1)===========================================
<CFMAIL TO="xxxx@hotmail.com"
         FROM="#form.name#"
         SUBJECT="#form.subject#"
         SERVER="mail.hotmail.com"
         MIMEATTACH="#form.attachment#">
<CFMAILPARAM NAME="Reply-To" VALUE="#form.email#">
#form.message#
</CFMAIL>

2)==========================================
<CFMAIL TO="xxxx@hotmail.com"
         FROM="#form.name#"
         SUBJECT="#form.subject#"
         SERVER="mail.hotmail.com">
<CFMAILPARAM NAME="Reply-To" VALUE="#form.email#">
#form.message#
<CFMAILPARAM FILE="#form.attachment#">
</CFMAIL>
----------------------------------------------------

Both would send the file but only in *.TMP extension and gives its own name (such as AG93849.TMP).  The file size is the same as the orginal file.

I have tried both method above and it works perfectly fine if I put a static path (so #form.attachment# is replace with things like 'C:\mypic.jpg')

Austen
ASKER CERTIFIED SOLUTION
Avatar of meverest
meverest
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of acx

ASKER

Thank you... I wanted a second opinion and I got it.  I was trying to avoid using CFFILE, but I guess I have no other choice.  Thanks

Austen