Digital signature in MailItem

Add-in Express™ Support Service
That's what is more important than anything else

Digital signature in MailItem
Detecting and access of digital signature 
Wolfgang Denz




Posts: 18
Joined: 2011-08-05
Hi,

I try to export emails with addin-express via the MailItem.HTMLBody property which works pretty well.
In the past I used the method Mailitem.Saveas to extract the complete email, but with large inline attachments I got an exception which I couldn't supress, so I now extract the Body from the mail via the HTMLBody-property.

Now I want to detect if the mail was digitally signed and extract the digital signature as well.

Can you please help me with that?

Best regards
Wolfgang
Posted 10 Jul, 2020 04:25:02 Top
Andrei Smolin


Add-in Express team


Posts: 17361
Joined: 2006-05-11
Hello Wolfgang,

Check
- Property for a message that is secured (encrypted)
- How do I see if a mailitem has a certificate
- C# Programmatically add certificate to Outlook contacts

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 10 Jul, 2020 05:25:56 Top
Wolfgang Denz




Posts: 18
Joined: 2011-08-05
ok, got it:

Param := Mailitem.PropertyAccessor.GetProperty('http://schemas.microsoft.com/mapi/proptag/0x6E010003');
if (Param and 2) then Signed := ' Signiert ';
if (Param and 1) then Encrypted := ' Verschlüsselt ';

Thanks for your hint
Posted 10 Jul, 2020 06:38:50 Top
Andrei Smolin


Add-in Express team


Posts: 17361
Joined: 2006-05-11
Thanks for posting your find!

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 10 Jul, 2020 06:43:11 Top