简体   繁体   中英

How to programmatically read and send encrypted emails using an Office 365 mailbox?

We are about to integrate an external message handling system with an Office 365 mailbox. When sending emails clients sometimes like to use the encrypt function provided by Outlook and expect the replies to be similarly encrypted. That is why we need to be able to programmatically read and send also encrypted emails (preferably using PHP).

We have noticed that Microsoft provides the Graph REST API for accessing mailboxes:

That API seems to allow reading and sending messages, but there is no mention about encrypted emails. Does anyone know if those are supported by this API? Or is there something else that would be better suited for the job?

There is nothing explicit in the Graph for doing encrypted emails however the Graph allows you to send native MIME email https://docs.microsoft.com/en-us/graph/outlook-send-mime-message so this allows you to use SMIME for encryption and signitures. You need to handle all the ancillary parts of SMIME yourself (eg distributing certificate etc) OpenSLL can handle most of it https://www.openssl.org/docs/man1.0.2/man1/openssl-smime.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM