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

Free Support Forum - aspose.com

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



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.

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


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

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 |
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


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.

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


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());


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