[ https://issues.apache.org/activemq/browse/SM-406?page=all ]
Ging Ming Chan reopened SM-406: ------------------------------- I believe there is a bug in the getAttachments() method. When the "attachments" property is not set, then the method will return null without getting to the part where the NMS attachments are processed. It should continue to process the rest of the method without returning null: try { // get attachment from property org.apache.servicemix.email.attachment String listAttachment = (String)getAttachments().evaluate(exchange, normalizedMessage); if (StringUtils.isNotBlank(listAttachment)) { StringTokenizer st = new StringTokenizer(listAttachment, ","); if (st != null) { while (st.hasMoreTokens()) { filePath = st.nextToken(); File file = new File(filePath); attachments.put(file.getName(), new FileDataSource(file)); } } } } catch (javax.jbi.messaging.MessagingException e) { logger.warn("file not found for attachment : " + e.getMessage() + " : " + filePath); } > Email component should support attachment (multipart MIME email) > ---------------------------------------------------------------- > > Key: SM-406 > URL: https://issues.apache.org/activemq/browse/SM-406 > Project: ServiceMix > Issue Type: Improvement > Components: servicemix-components > Affects Versions: 3.0 > Reporter: jerome camilleri > Assigned To: Guillaume Nodet > Fix For: 3.0-M2 > > Attachments: patch.txt > > Original Estimate: 5 minutes > Remaining Estimate: 5 minutes > > Currently the Email component does not allow to read or send mail with > attachment (attachments is not supported and ignored). > The current MimeMailMarshaller must be improve to add ability to send > multipart MIME email. > The current MimeMailPoller must be improve to add ability to read multipart > MIME email. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira