Solved

CFMail & attachment

Posted on 2001-07-16
2
341 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

Turn your laptop into a mobile console!

The CV211 Laptop USB Console Adapter provides a direct Laptop-to-Computer connection for fast and easy remote desktop access with no software to install.

Question has a verified solution.

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

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

617 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