title: How can I send email Multipart with JavaMail?
body: <p>I have a random error with my web app in Struts2 when java code send a mail:</p>
  
  <pre><code>javax.mail.MessagingException: IOException while sending message;
    nested exception is:
      javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed; 
  at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1290)
      at javax.mail.Transport.send0(Transport.java:255)
      at javax.mail.Transport.send(Transport.java:124)
  </code></pre>
  
  <p>I have deployed file war in WILDFLY 10 (Jdk 1.8) and inside war in folder WEB-INF/lib there are these libraries: 
  activation-1.1.jar  and mail-1.4.jar.</p>
  
  <p>Sometimes sending the email works but random I see the error above. 
  All emails have no attachments and the code is always the same.</p>
  
  <p>I am going crazy,  I'm doing email test in Test environment and it always works.</p>
  
  <p>I checked folder "modules/system/layers/base/javax/mail/api/main" in Wildfly and founded "javax.mail-1.5.5.jar", in "/modules/system/layers/base/javax/activation/api/main" there is "activation-1.1.1.jar"</p>
  
  <p>Any idea?
  thank a lots</p>