tracker issue : CF-4166939

select a category, or use search below
(searches all categories and all time range)

CFMAIL - Attachments not appearing in Apple IOS Mail App when cfmailparam has both inline and attachment content

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Roberto Anania / Roberto Anania (Roberto Anania)

Created: 06/22/2016

Components: Net Protocols, MAIL

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Normal / Some users will encounter

Locale/System: English / iOS All

Vote Count: 0

Listed in the version 2016.0.03.300466 Issues Fixed doc
Problem Description: For CFMAIL, when cfmailparam has both inline and attachment content the attachments are missing when viewing the emails in the Apple IOS Mail App. Considering the number of users that use their iPhones and iPads to read their email, this is a big issue for our clients.

Steps to Reproduce: Send an email using CFMAIL and embed an inline image as well as attach a file. I have attached sample code.

Expected Result: The attachments should not be missing.

Any Workarounds:  It seems using the contentID attribute with cfmailparam to attach the inline image causes the problem. The email content-type becomes "multipart/related" instead of "
multipart/mixed" and there is no way to override this value.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4166939

External Customer Info:
External Company:  
External Customer Name: Roberto Anania
External Customer Email:  
External Test Config: My Hardware and Environment details: CF11 on Windows 2008 Web Server.


  1. June 22, 2016 00:00:00: 1_code_sample.cfm


This is not a duplicate of #CF-4016861. That bug was related to CFPOP. This is a completely different issue.
Comment by External U.
2318 | June 22, 2016 08:25:56 AM GMT
I noted and wrote a blog post many years ago that covers this issue. Setting the contentID attribute in the CFMAILPARAM tag causes the email content-type to be set as "multipart/related". By omitting ContentID param you get the correct multipart/mixed setting.
Comment by External U.
2319 | July 19, 2016 02:25:05 PM GMT
Hello Wil, In your blog, you are attaching a file. In my example, I am attaching a file and I am adding an inline file (common requirement would be an embedded logo for an email signature). When you have both inline and attachment files, this is where the error occurs. Please see my uploaded code sample. Thank you.
Comment by External U.
2320 | July 19, 2016 02:40:36 PM GMT
This is related to this bug report from 2012. Roberto: by removing the contentId param I was able to send to my iPhone an email with both an inline image and attached pdf from CF2016 today. Try: <cfmailparam file="/images/logo.jpg" disposition="inline" /> Instead of: <cfmailparam file="/images/logo.jpg" contentid="logo" disposition="inline" />
Comment by External U.
2321 | July 19, 2016 02:49:58 PM GMT
If you remove the contentid, how would you link the image file to its place in the email content? Each inline image would need a unique contentid.
Comment by External U.
2322 | July 19, 2016 03:12:13 PM GMT
I see what you're saying. I think the issue is in the mail spooler itself. When I capture the generated mail file from the ColdFusion spool the content type is whatever I specify in the code. Sit will show multipart/mixed or text/html as I specify. But once the ColdFusion mail spool grabs the file and sends it to a mail server the content-type becomes multipart/related. I think this is following the RFC though for sending emails with inline attachments using contentId. However, there may be more as I see Microsoft just released a bug fix for Outlook this month that appears to be for this same issue. Adobe you should check the spooler to make sure it's working correctly.
Comment by External U.
2323 | July 19, 2016 04:36:13 PM GMT
1) Problem: When Only a single body part along with an inline attachment & file attachment are present in the email we are using the structure such as multipart/related text/html inline attachment file attachment Few mail clients won't read file attachments from multipart/related message there by user will not be able to see the file attachment. The only structure that works across all mail clients is adding the file attachment at mixed multipart level & adding inline attachment at related level. Now we are following this structure to fix this issue. This issue should be tested on popular mail clients such as Apple Iphone, Ipad, Apple Mail, Gmail, Outlook (both desktop & web). multipart/mixed multipart/related text/html inline attachment file Attachment 2) Problem: When cfmail has multiple cfmailparts & both inline , file attachments are there when viewing such type of email in Apple iOS Mail app does not show file attachments. Again this is with the mail structure we are following to send the message multipart/related (in case inline attachments exists) multipart/alternative part part inline attachment file attachment multipart/mixed (when only file attachments exists This is correct in case of only attachments exists) multipart/alternative part part file attachment Now we are changing this structure to multipart/mixed multipart/alternative part multipart/related body inlineattachment file attachment Please let us know in case anyone sees any discrepancy in our approach. This will be tested on all popular email clients. Thanks, Pavan.
Comment by S V.
2324 | August 22, 2016 07:11:17 AM GMT
Thank you!
Comment by External U.
2325 | August 24, 2016 08:33:42 AM GMT
Will this be fixed in Coldfusion 11 Update 10? If so, is there a release date? Many thanks.
Comment by External U.
2326 | August 30, 2016 07:30:57 AM GMT
Roberto, This will be fixed for ColdFusion 11 in Update 11.
Comment by HariKrishna K.
2327 | September 01, 2016 10:43:47 PM GMT
This bug mentioned here:, along with a workaround for emails where images and other file types needed to be attached to the same email.
Comment by Jon L.
31064 | July 23, 2019 03:15:53 PM GMT
Thank you Jon. This issue was resolved in a later version of CF11. What version are you running?
Comment by Roberto A.
31065 | July 23, 2019 03:24:26 PM GMT