Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Convert Email to HTML in Java
// Load the EML/EMLX file to be converted
MailMessage message = MailMessage.load("email.eml");
// Save EML as HTML
message.save("Saved File.html", SaveOptions.getDefaultHtml());
// Load the MSG file to be converted
MailMessage message = MailMessage.load("email.msg");
// Save MSG as a HTML
message.save("Saved File.html", SaveOptions.getDefaultHtml());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment