tpitale / mail_room

Forward mail from gmail IMAP to a callback URL or job worker, simply.
MIT License
193 stars 51 forks source link

Add Microsoft Graph API to retrieve mail #125

Closed stanhu closed 3 years ago

stanhu commented 3 years ago

This commit adds support for reading a Microsoft Office 365 or Exchange Online mailbox via the Microsoft Graph REST API (https://docs.microsoft.com/en-us/graph/use-the-api). Authentication occurs via a OAuth2 service account.

tpitale commented 3 years ago

All looks great @stanhu. Thanks for putting in all this work! Let me know when you want me to merge, and then I can release a new version of the gem.

stanhu commented 3 years ago

@tpitale I think this is ready to merge:

  1. I tried sending 100 e-mails to one account. MailRoom pulled in 10 at a time via the REST API.
  2. Sent e-mails with attachments, worked fine.