EWS Retrieving Attachments from Signed Email

Hello

I fetch a MailMessage from IEWSClient, and this email is signed.
When I access the .Attachments property, I only see the “smime.7s” attachment and not the “real” attachments.
How could I retrieve these attachments ?

I saw this post : Processing digitally signed emails to retrieve MIME attachments - #2 by kashif.iqbal
But in this case I don’t have a file written on disk, and I would like to avoid writing on the disk just to read it directly. Is there any proper way to do that ?

Thank you
Fabrice

@Fabske,
Thank you for the issue description. We will reply to you as soon as possible.

@Fabske,
Unfortunately, I have not found a way to do that. I logged the issue with ID EMAILNET-40477 in our tracking system. Our development team will consider such a capability. We will inform you of any progress.

@Fabske,
Our development team has investigated the issue. Please try to use the next way:

MailMessage signedMsg = client.FetchMessage(messageInfo.UniqueUri);
if (signedMsg.IsSigned)
{
    MailMessage unsignedMsg = signedMsg.RemoveSignature();
    foreach (Attachment att in unsignedMsg.Attachments)
    {
        string name = att.Name;
        //your code to work with attachment
    }
}

If the issue persists, please share the code example you are using and the message file.

Thank you, it works !