Checkbox replaced with ? while converting Msg to MHT/HTML

Hi team,
We use 19.11, 20.1 and 20.2 AsposeEmail.dll.
We faced with issue: checkboxes existed in email replaced with “???” in our mht file after converting

Regards,
Dmitry

@cap.aspose,

I have observed the issue statement shared by you and request you to please try using Aspose.Email for .NET 20.2 on your end. In case the issue still exists then please share the working sample code along with source file and generated output with us. We will be able to investigate the issue further on our end on provision of requested information.

Hi,
I believe you read carefully my comment. I tried using Aspose.Email.dll 20.2 but I had the same result unfortunately…

@cap.aspose,

Thank you for sharing the feedback. As requested earlier, can you please provide following information.

Hi,
Try to receive message with combobox in body like this one (Input.zip (34.4 KB)
)
We use this code to include embedded resource to HTML:

using (MemoryStream ms = new MemoryStream())
{
HtmlSaveOptions htmlSaveOption = new HtmlSaveOptions();

htmlSaveOption.HtmlFormatOptions |= HtmlFormatOptions.WriteHeader |
HtmlFormatOptions.WriteCompleteEmailAddress |
HtmlFormatOptions.WriteCompleteCcEmailAddress;
htmlSaveOption.CheckBodyContentEncoding = true;
htmlSaveOption.EmbedResources = true;
msg.Save(ms, htmlSaveOption);

string html = Encoding.ASCII.GetString(ms.ToArray());
}

Email Msg.Html has a body like show below:
image.png (14.4 KB)

html string has a body like:
image.png (14.6 KB)

moreover html string has a “???” at the begin like show below:
image.png (5.4 KB)

Could you clarify what’s the problem.
Thank you

@cap.aspose,

I have observed the issue shared by you and have created a ticket with ID EMAILNET-39756 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

Hi,
As I see an issue status has been changed to resolved.
Could you clarify does this fix will be included into 20.3 ?
Thanks,
Dmitry

@cap.aspose,

Yes, the issue has been marked as resolved in upcoming Aspose.Email for .NET 20.3. The product has not yet been shared online. We will share notification with you once it will be available.

Actually, the problem is that the HTML body of the message contains non ASCII characters, so for correct conversion from bytes to string you must use UTF8 encoding.

        string html = Encoding.UTF8.GetString(ms.ToArray());

or

        Encoding enc = message.BodyEncoding ?? message.PreferredTextEncoding;
        string html = enc.GetString(ms.ToArray());