[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 590
  • Last Modified:

CFMail attachment problem with ColdFusion MX 7

I have an application that produces email messages from database content. Messages may have one or more attachments. The attachments are uploaded to a folder on the CF server, and the full path is stored in the database.

I have been using cfmailparam to add the attachments to the message, but I am getting an unexpected result. The files are attached, but the file name and extension are altered. Rather than "myfile.pdf", for example, I get "ATT114257.dat‎". I am confident that I am passing the correct mime type into the cfmailparam tag.

<cfmailparam disposition="attachment" file="c:\myattachments\myfile.pdf" type="application/pdf">

Any suggestions as to how I can get cfmail to manage multiple attachments so that the file name and extension are preserved?
0
incapital
Asked:
incapital
1 Solution
 
usachrisk1983Commented:
Hmm, from my MS Outlook days I remember that getting the ATT*.dat files usually meant that the message had something embedded that couldn't be read by the client, or wasn't being processed properly at the sending mail server side.

Try removing the type from your cfmailparam and see if the server/client will send it properly.
0
 
incapitalAuthor Commented:
You are correct. Removing the mime type from the cfmailparam tag did it. Many thanks.
0
 
TimmyAllmarkCommented:
Same solution worked for me too!
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now