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 https://www.appmaildev.com/en/dkimfile
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