I'm trying to figure out if there is a way to check if the email or part of email is encrypted so that I can return the email. According to this link.
https://technet.microsoft.com/en-us/library/dn569286.aspx
The different types of email encryption options in Office 365 including Office Message Encryption (OME), S/MIME, Information Rights Management (IRM).
I sent one email from my outlook making it confidential, I can see the email body saying This message has been marked as Confidential. You've received an encrypted message from xxxxxx@xxx.com
To view your message
Save and open the attachment (message.html), and follow the instructions.
Sign in using the following email address: xxxxx@xxx.com Message encryption by Microsoft Office 365
When I loaded the content of the email message, in the content I found this
X-MS-Exchange-OMEMessageEncrypted: true
emailMessage.load(new PropertySet(EmailMessageSchema.MimeContent));
is there a way to get to this property of the email message. because the property getItemClass is just returning this.stack overflow question saying we can check this property
emailMessage.getItemClass() -IPM.Note