A Unique Developer

Can't see email attachment in iOS email application send through Railo/Lucee

Recently, We started getting lots of complain about attachment not going through email send via our Railo/Lucee application but this wasn't case for everyone. After taking review from different clients I realize that only mobile user not able to see attachment on their phones. Specially this case I found with iOS 7 and higher. Not sure about below iOS 6 since I never get such complain earlier. CFMAIL tag code was perfectly right, specified attachment mime type but still iOS email app wasn't showing it correctly. In different web mail client, desktop mail clients and even in Android displays email attachment but iOS. 

Not sure why but didn't find much help on internet, may be because of less number of people uses Railo/Lucee though this is big issue. After spending number of hours I realize that issue only appear with email type is HTML. In text format it appear fine. Also, embeded images in email displayed nicely. 

Here is an example to send email with attachment which causing issue with attachment.

As I mentioned earlier, attachment appearing correctly with text format email and using this as solution I have change type to "text" from "html" and to display body content in HTML added multipart with type "HTML" and this work pefectly fine with iOS mail application.

Here is full working solution.

 Just put html body content in cfmailpart and for cfmail provided type="text" instead of HTML. This will make sure attachment appear correctly in iOS.

Not sure what exact reason behind this issue but hopefully Lucee guys will resolve this out.