In Fuse 6.x, JavaMail fails to send an attachment with an empty message body
Issue
An application running on JBoss Fuse 6.x attempts to create an outbound mail message with an attachment but no message body, using the JavaMail API. The JavaMail operation fails with the following exception:
java.io.IOException: javax.mail.MessagingException: Empty multipart: multipart/related;
boundary="----=_Part_1_1764158333.1411422992098"
at com.sun.mail.handlers.multipart_mixed.writeTo(multipart_mixed.java:105)
at javax.activation.DataHandler.writeTo(DataHandler.java:77)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1485)
at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.j
The same operation succeeds in a stand-alone Java application.
Environment
- Red Hat JBoss Fuse
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.