Empty E-Mail after converting to MHTML format

Environment: Aspose Email 22.1 or 22.4, Windows

We received an email from the customer that was not correctly converted to PDF. The content of the PDF is completely empty except for the mail header.

For the PDF export, the e-mail is first saved in MHTML format (see standard Aspose examples). The MHTML format is already empty.

The e-mail can at least be converted as an EML file. However, both email formats (MSG and EML) are not correctly converted to MHTML. The e-mail uses the RTF format and has been signed.

In the attached ZIP is the original and the conversions.

email-samples.zip (391.4 KB)

@depi

We have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as EMAILNET-40608. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@depi

To correctly convert signed messages in MHTML format you should remove signature first as shown below:

MapiMessage mapi = MapiMessage.Load(fileName);
MailMessage mailMessage = mapi.ToMailMessage(new MailConversionOptions());
if (mailMessage.IsSigned)
{
    MailMessage unsignMsg = mailMessage.RemoveSignature();
    unsignMsg.Save(fileName + ".mhtml", SaveOptions.DefaultMhtml);
}
else
{
    mailMessage.Save(fileName + ".mhtml", SaveOptions.DefaultMhtml);
}