[ https://issues.apache.org/jira/browse/CAMEL-5980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15230807#comment-15230807 ]
Rick Johns commented on CAMEL-5980: ----------------------------------- I took a look at this. There are a couple places in MailBinding that can be tweaked to cope with a null file name, but a ParseException is thrown when trying to retrieve the file name parameter list for the ContentDisposition on the message/rfc822 attachment. It looks like we'd just have to catch the exception in MailBinding.extractAttachmentsFromMultipart() and drop the attachment or create a disposition with no parameter list. The tweaks to MailBinding I tried are just to replace a null attachmentFilename in addAttachmentsToMultipart() with an empty string, and to generate a place holder for the null fileName in extractAttachmentsFromMultipart(), because it's used as a map key. What do you think? > camel-mail - Better handle null values when extracting attachments > ------------------------------------------------------------------ > > Key: CAMEL-5980 > URL: https://issues.apache.org/jira/browse/CAMEL-5980 > Project: Camel > Issue Type: Improvement > Components: camel-mail > Affects Versions: 2.9.0, 2.10.0 > Reporter: Claus Ibsen > Priority: Minor > Fix For: Future > > Attachments: EmailExceptionTest.java, EmailTest.java, Exception > Mail.eml, debug_log.txt > > > See nabble > http://camel.465427.n5.nabble.com/MailComponent-s-claim-to-handle-special-mail-multipart-formats-and-attachments-tp5724859.html > We should see if we can fix the Camel code to handle those null data. -- This message was sent by Atlassian JIRA (v6.3.4#6332)