Solved

CFMail & attachment

Posted on 2001-07-16
2
340 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
What You Need to Know when Searching for a Webhost Provider
In an interesting question (https://www.experts-exchange.com/questions/29008360/) 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…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 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