1

Does EWS managed api expose any property to identify whether an item( email/attachment) is encrypted?

Sameer
  • 3,124
  • 5
  • 30
  • 57
  • I guess it depends on what type of encryption your talking about but generally the FileName and contentType will indicate this. EWS doesn't really concern itself with encryption its just the transport/Access mechanism so it always going to give you the raw data in an encrypted format. – Glen Scales Oct 22 '14 at 04:00
  • Then how does owa or outlook know if an email is encrypted ? I see a lock sign in an email if that email is encrypted when viewing it from owa or outlook. – Sameer Oct 27 '14 at 09:01
  • 1
    Because encryption is a client based thing it depends on the client. You should read the SMIME protocol document http://msdn.microsoft.com/en-us/library/cc433474(v=exchg.80).aspx in particular http://msdn.microsoft.com/en-us/library/ee237324(v=exchg.80).aspx EWS will give you access to most of these Extended properties although it doesn't provide access to them on attachments where you can only use Strongly typed properties. – Glen Scales Oct 28 '14 at 05:42

1 Answers1

1
 var isEmailOpaqueSignedOrEncrypted = false;

if (email.ItemClass == "IPM.Note.SMIME")
{
    var attList = email.Attachments.ToList();
    if (attList.Count == 1)
    {
        isEmailOpaqueSignedOrEncrypted = true;
    }
};
Sameer
  • 3,124
  • 5
  • 30
  • 57