title: Java MimeMessage to eml File with all attachments
body: <p>I have an incoming <code>MimeMessage</code> in my <strong>JAMES</strong> mail server. I want to create an eml file dumping the message completely. I tried using the <code>writeTo</code> method of MimeMessage - resulting file contains only the text body of the email. The attachments are not written to the eml file.  My code is something like </p>
  
  <pre><code>String logFileName = "dumpNow.eml";
  incomingEmail.getMessage().writeTo(new FileOutputStream(new File(logFileName)));
  </code></pre>
  
  <p>I do not get any multipart content in the dump. Is there any Util available to do this? <strong>Apache Mimeutils</strong> is also giving the same result.</p>