Search code examples
javaasposemsgeml

Convert EML to MSG - Java


I want to read the attachments from an EML file. . I prefer converting the EML file to an MSG file so I can re-use the written code, is this possible? If not, is there a way reading attachments from an EML file?


Solution

  • If not, is there a way reading attachments from an EML file?

    JavaMail supports reading EML files (MIME-type message/rfc822). See the example here.

    Then extract attachments like this. See also this explanation.