UnsupportedDataTypeException When Sending an Email Attachment with Camel deployed in Fuse ESB
Issue
Deploying a Camel route in Fuse ESB to send an email attachment may result in the following exception:
Caused by: org.springframework.mail.MailSendException: Failed messages: javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: image/jpeg; message exceptions (1) are:
Failed message 1: javax.mail.MessagingException: IOException while sending message;
nested exception is:
javax.activation.UnsupportedDataTypeException: image/jpeg
at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:440)[75:org.springframework.context.support:3.0.5.RELEASE]
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:340)[75:org.springframework.context.support:3.0.5.RELEASE]
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:355)[75:org.springframework.context.support:3.0.5.RELEASE]
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:344)[75:org.springframework.context.support:3.0.5.RELEASE]
at org.apache.camel.component.mail.MailProducer.process(MailProducer.java:44)[218:org.apache.camel.camel-mail:2.8.0.fuse-03-06]
at org.apache.servicemix.examples.camel.processors.MailProcessor.process(MailProcessor.java:49)[221:camel-osgi:4.4.1.fuse-03-06]
Note the content type may very and doesn't necessarily have to be image/jpeg.
Environment
Camel 2.10
JBoss Fuse 6.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.