Receive signed e-mails with SPEmailEventReceiver

I have created SPEmailEventReceiver that process incoming e-mails and its attachments. Everything works fine except the processing e-mails that are signed.

Once the signed e-mail is received, the receiver won’t detect any attachments. I’m trying to get attachments from SPEmailMessage.Attachments. Any idea?




Does the signed email documents getting into the document library?
– Amal Hashim
Jan 19 ’15 at 13:28



Yes Amal, it’s a document library.
– Marek Buban
Jan 19 ’15 at 13:29


1 Answer


When an email is digitally signed, it basically encrypts the message. This way the message stays safe and only the recipients who has the certificate available can view the messages.

What you can try is

Make sure that SharePoint can parse the message and attachments – This can be done by looking into the document library (SharePoint has the option to save attachments separately)
If SharePoint is unable to do that, then you don’t have much luck – In this case you need to create your own Parsing logic to decrypt the message & attachments.