DKIM Signing failed with body hash error

I’m having trouble signing a message with DKIM.

When I load a MHTML file in a mailmessage, the line “This is a multi-part message in MIME format.” is added to the body (I can see this line is added when I save the mailmessage to a .EML file).
This extra added line is also included when the hash is generated for the entire body when signing the mailmessage.

But, when the message is received on the other end, for example gmail and you’ll look at the original message the line “This is a multi-part message in MIME format.” is gone, and DKIM is FAILED.
DKIM verification failed, because the body is no longer the same.

I know this is the reason for DKIM to fail, because I tested it with an online service Test DKIM, SPF, DMARC, DomainKey, RBL by Uploading Email Content - Online Test Tool

Here you can upload a EML file, and test it. When I download the message in gmail as EML and manually add the multipart line, then DKIM will suddenly pass.

So, I’m looking for a possibility that when the message is created with Aspose.Email, this line will not be added to the body, because it will cause the DKIM verification to FAIL.

I tested this using Aspose.Email version 19.12


I have observed the issue shared by you and an issue with ID EMAILNET-39732 has been added as investigation in our issues queue to further investigate the issue on our end. This thread has been linked with the issue so that you may be notified once it will be addressed.

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