Solved

CFMail & attachment

Posted on 2001-07-16
2
329 Views
Last Modified: 2013-12-24
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
0
Comment
Question by:acx
2 Comments
 
LVL 37

Accepted Solution

by:
meverest earned 80 total points
Comment Utility
Hi,

what creates form.attachment?  is it a <input type=file> thingy?  if so, you will probably first need to save it to the server with <cffile action=upload>, then attach to the email.

but having only cf4 at my disposal, i can't test that out right now...

cheers.
0
 

Author Comment

by:acx
Comment Utility
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
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now