AlternateView not added when loading a MHTML and not adding any attachment

I’m creating a mailmessage by loading a MHTML File.
After that, I add an alternativeview using only plain text (by using CreateAlternateViewFromString).

When I save the mailmessage to an EML file, I’ll only see the plain text when I’ve added one or more attachments. When I send a mailmessage loaded with a MTHML but without any attachments, the alternateview is not added.

Tested using Aspose.Email 19.12

@GerhardTM,

I have observed the issue shared by you and request you to please first try using latest Aspose.Email for .NET 20.1 on your end. In case the issue persist, please share the source file, working sample code and output file reproducing the issue. We will be able to proceed further with investigation on our end on provision of requested information.

I tried using Aspose.Email 20.1, but the problem is still the same.
I attached a sample project with sample code and example files.

AsposeEmail.zip (4.5 MB)

@GerhardTM,

Thank you for sharing the sample project with us. I have generated the EML files with and without attachments added. Can you please check the snapshot view of two images that what is the issue and what is expected output you ought to get using Aspose.Email API.

EML_With_Attachment.png (80.0 KB)
EML_Without_Attachment.png (77.7 KB)

You’ll need to inspect the .eml files with notepad or another texteditor and compare the two files.

In the version with the attachment you’ll see it has contenttype multipart/mixed, and further down you’ll see a contenttype text/plain with the plain alternate text.

In the version without the attachment that section with contenttype text/plain is missing.

@GerhardTM,

Thank you for sharing the clarification. An issue with ID EMAILNET-39734 has been created in our issue tracking system to further investigate the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

The issues you have found earlier (filed as EMAILNET-39734) have been fixed in this update.