Solved

CFMail & attachment

Posted on 2001-07-16
2
331 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
ID: 6288300
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
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

Austen
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Grub Broken on Ubuntu 16.04 LTS, Mate 1.14 GUI 5 221
wordpress email form 23 79
PHP Register global 21 87
.dwt files not viewable in browser - why? 2 90
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…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

773 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