Determine if email is encrypted when using word as email editor

A

|{arl Shtoshek

Hi,
Using Office 2002 and MS Word to edit e-mail messages ("Mail format"
setting in outlook), I want to determine programmatically if a new
outgoing message is set to be encrypted. This check would happen just
before the message is sent.

I am developing an outlook com-addin.

When _not_ using word as the e-mail editor, I could create a standard
outlook "Encrypt Message Contents and Attachments" button (Id:=718)
and check its state (if pressed down - its encrypted). When using
word, I couldn't find such button...

If I understand correctly - to make an outgoing mail encrypted (using
word as the editor), I have to press "Options" and there under
security settings I can check "encrypt...". Are there other ways to
encrypt a message?

TIA
Karls
 
K

Ken Slovak - [MVP - Outlook]

To determine if a message is encrypted you can check its MessageClass. It
will not be a standard "IPM.Note" MessageClass. It will be something like
IPM.Note.Secure. See http://support.microsoft.com/?kbid=194623 for more
information on the various MessageClass's and a CDO 1.21 code sample for
checking security descriptors.
 
A

|{arl Shtoshek

Hi,

I managed to get the MessageClass both using
Outlook.MailItem.FormDescription.MessageClass and the CDO method, like
described in the link you provided.
But I still have a problem because I get the same MessageClass both
for signed and encrypted messages. It is IPM.Note.SMIME. I need to do
something (cancel the sending) only if the message is encrypted and
not when the message is just signed...

Thanks,
Karls
 
K

Ken Slovak - [MVP - Outlook]

I don't know if you can tell one from the other, I've never checked that
out. I'd recommend downloading a copy of OutlookSpy from www.dimastr.com and
looking at the MAPI properties of items that are signed, encrypted, etc. and
seeing what differences there are.

You should be able to use MailItem.MessageClass and not have to get into
FormDescription.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top