We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Not embedded pictures in msg to html conversion

Problem description:
We tried to convert saved msg messages to html and encountered problem with images in them. For other formats when “No Embedding” is selected images are saved as separate files next to html, however in case of Aspose.Email they are simply skipped.

String source = "e:/tmp/test.msg";
String destination = "e:/tmp/html.html";
Path p = Paths.get(source);
FileInputStream in = new FileInputStream(p.toFile());
LoadOptions loadOptions = new MsgLoadOptions();
MailMessage copyMail = MailMessage.load(in, loadOptions);
HtmlSaveOptions saveOptions = new HtmlSaveOptions();
saveOptions.setEmbedResources(false);<a class="attachment" href="/uploads/discourse_instance3/1201">Test.zip</a> (19.1 KB)

File file = Paths.get(destination).toFile();
copyMail.save(file.getAbsolutePath(), saveOptions);

Attached file is .msg file packed to zip due to upload restrictions.Test.zip (19.1 KB)


The feature you are looking for is not available. A feature request has been logged into our system with ID EMAILJAVA-34292. Our product team will further look into it and provide feedback. We will share feedback with you in this thread as soon as it is available.