CFMail & attachment

Posted on 2001-07-16
Last Modified: 2013-12-24

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:

<CFMAILPARAM FILE="#form.attachment#">

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')

Question by:acx
LVL 37

Accepted Solution

meverest earned 80 total points
ID: 6288300

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...


Author Comment

ID: 6290276
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


Featured Post

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
IPA - can it be run on a web server? 3 208
IIS url rewrite rule for web application 3 63
ip / url redirect 13 74
Setting Up Local Lan Web Server 1 65
In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
In an interesting question ( here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

820 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