[ https://issues.apache.org/jira/browse/CAMEL-6045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christoph Giera updated CAMEL-6045: ----------------------------------- Patch Info: Patch Available patch added > Camel Email Component Missing Attachments > ------------------------------------------ > > Key: CAMEL-6045 > URL: https://issues.apache.org/jira/browse/CAMEL-6045 > Project: Camel > Issue Type: Bug > Components: camel-mail > Affects Versions: 2.6.0 > Reporter: Christoph Giera > Attachments: MailBinding.java.patch > > > see > http://camel.465427.n5.nabble.com/Camel-Email-Component-Missing-Attachments-td3386382.html#a5727102 > The disposition field is optional(see RFC 2183), so it is possible that camel > misses attachments. > {noformat} > if (disposition != null && > (disposition.equalsIgnoreCase(Part.ATTACHMENT) || > disposition.equalsIgnoreCase(Part.INLINE))) { > // only add named attachments > String fileName = part.getFileName(); > if (fileName != null) { > LOG.debug("Mail contains file attachment: " + > fileName); > // Parts marked with a disposition of Part.ATTACHMENT > are clearly attachments > CollectionHelper.appendValue(map, fileName, > part.getDataHandler()); > } > } > {noformat} > Adding the fileName check to the if should resolve the issue. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira