RemoveSignature() always return: Mail message is not signed

Hi,

Recently we began to receive signed email, which our component did not support. We have added some code to be able to remove the signature from the email. Unfortunately the code did not do what we expected. It detects the email signed but cannot remove the signature.

The function RemoveSignature() always return exception: Mail message is not signed

Here is our code:

try
{
    mail = MailMessage.Load("C:\\74628e60-6c57-4e10-a04f-98c274acf2f8.msg", MessageFormat.Msg);

    if (mail.IsSigned)
    {
        mail.RemoveSignature();
    }

    mail.Save(this.Filename, MailMessageSaveType.OutlookMessageFormatUnicode, MailMessageSaveOptions.None);
}
catch(Exception ex)
{
    //...
}

What we missed to make it work?

Thanks!

Hi Sophie,


We are sorry for any inconvenience you have faced.

Could you please provide us such a sample message file for our analysis in order to investigate this issue further? We’ll look into it and assist you further accordingly.