Hi,
We are experiencing an issue transforming certain emails.
we use the following code (condensed)
com.aspose.email.LoadOptions mailLoadOptions = new EmlLoadOptions();
MailMessage eml = MailMessage.load(inFilePath.toString(), mailLoadOptions);
// Save the Message to output stream in MHTML format
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
eml.save(outputStream, SaveOptions.getDefaultMhtml());
ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
outputStream.close();
// Load the stream in Word document
LoadOptions lo = new LoadOptions();
//lo.setEncoding(Charset.forName(“UTF-8”));
lo.setLoadFormat(LoadFormat.MHTML);
Document doc = new Document(inputStream, lo);
doc.save(“mhtmlDoc.docx”);
inputStream.close();
The resulting word file is an empty document. This problem occurs when using different load and save options.
We are using Aspose Email for Java 17.5.0
in attachment you will find several eml messages for which the issue occurs
What could be the cause and how can we fix or prevent this.