'How do I check for the presence of a valid email (digital) signature attached to an Outlook MailItem (email message)?
Is there any way to
- Retrieve a digital signature attached to a MailItem using VBA?
- Verify its validity using VBA?
I'm pretty much limited to VBA in this regard. I've tried inspecting the Sender and MailItem objects but I can't see anything about a Signature object.
Solution 1:[1]
Outlook always represents signed/encrypted messages as regular "IPM.Note MailItem" objects. It goes as far as returning a fake IMessage MAPI interface from the MailItem.MAPIOBJECT property.
You can see this in OutlookSpy (I am its author) - select a signed message, click IMessage button on the OutlookSpy ribbon. PR_MESSAGE_CLASS will be IPM.Note. Select the PR_ENTRYID property, right click, select IMAPISession::OpenEntry. You will get back the real message with PR_MESSAGE_CLASS = IPM.Note.SMIME.MultipartSigned. You can see the attachment that contains the data.
You are pretty much limited to Extended MAPI (C++ or Delphi only) or Redemption (I am its author - any language - it wraps Extended MAPI) if you want to distinguish signed/encrypted message from the regular ones. Redemption exposes RDOEncryptedMessage object. You can retrieve it from RDOSession.GetMessageFromID using the entry id retrieved from MailItem.EntryID property in OOM.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
