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?
LVL 3
incapitalAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
usachrisk1983Connect With a Mentor Commented:
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
All Courses

From novice to tech pro — start learning today.