Summary | A mail poller plugin to enable polling emails from mailboxes on Exchange Online | |
Repository Link | GitHub - CERN/msgraph-poll-discourse-plugin: Discourse plugin to enable polling emails usign Microsoft Graph API | |
Install Guide | How to install plugins in Discourse |
Features
This plugin adds the possibility to poll emails from a mailbox hosted on Exchange Online via OAuth token authentication. It uses the Microsoft Graph API to read the emails, and it works as an alternative to the POP3 protocol with basic authentication.
Prerequisites
- Your Exchange Online tenant needs to have an application with
Mail.ReadWrite
delegated permissions. - You need to get a refresh token for the application with permissions to read/write mails from the mailbox you want to use.
Configuration
msgraph_polling_mailbox
: Mailbox to poll emails frommsgraph_polling_client_id
: Client ID of the application on the Exchange Online tenantmsgraph_polling_tenant_id
: Exchange Online Tenant IDmsgraph_polling_oauth2_refresh_token
: Refresh token described abovemsgraph_polling_login_endpoint
: Defaults tohttps://login.microsoftonline.com
msgraph_polling_graph_endpoint
: Defaults tohttps://graph.microsoft.com/v1.0
The repo contains guidance on how to get the refresh token.
Use the reply-by-mail feature
This plugin also contemplates the case where users want to use the reply-by-mail feature. For such cases, you need to set the following settings:
reply by mail
: checkedreply by mail address
:account+%{reply_key}@example.com
email_in
: checkedmanual polling enabled
: uncheckedpop3 polling enabled
: unchecked
n.b.: the reason why manual polling enabled
and pop3 polling enabled
is not needed is because the PR contemplates this scenario.