# How to setup outgoing Discourse mails from Office365/Exchange for notifications without using SMTP?

**URL:** <https://meta.discourse.org/t/how-to-setup-outgoing-discourse-mails-from-office365-exchange-for-notifications-without-using-smtp/312724>\
**Category:** Self-hosting\
**Tags:** email\
**Created:** [June 19, 2024, 9:13am UTC](https://meta.discourse.org/t/how-to-setup-outgoing-discourse-mails-from-office365-exchange-for-notifications-without-using-smtp/312724 "2024-06-19T09:13:24Z")\
**Posts on this page:** 2\
**Page:** 1

## AI-generated summary

In a discussion about configuring outgoing notifications for a self-hosted Discourse instance on Ubuntu, [martin.spindler](/t/-/312724/1) asks if it is possible to send emails via Office365 or Exchange without enabling SMTP, following a migration from a self-hosted mail server. [pfaffman](/t/-/312724/2) clarifies that Discourse fundamentally requires SMTP to send emails and there is no alternative method to bypass this. As a recommended solution, [pfaffman](/t/-/312724/2) suggests using a transactional email service like Mailgun, which can be configured to handle the forum's subdomain while the primary domain remains managed by Microsoft. Alternatively, the user could re-establish their own self-hosted mail server, though this is strongly discouraged due to the complexities and maintenance involved.

<div class="post-metadata">

**Author:** ![martin.spindler](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@martin.spindler](https://meta.discourse.org/u/martin.spindler)\
**Post date:** [June 19, 2024, 9:13am UTC](https://meta.discourse.org/t/how-to-setup-outgoing-discourse-mails-from-office365-exchange-for-notifications-without-using-smtp/312724/1 "2024-06-19T09:13:24Z")

</div>

Hey folks,

Is there a way to setup outgoing Discourse mails for notifications without using SMTP? Instead we need exchange / Office365. How to setup / authenticate without enabling SMTP on the Microsoft side?

We are using discourse docker self-hosted on a Plesk-managed ubuntu server. Problem is, that we moved our mail domain from self-hosted mailserver to microsoft office 365.

Thank you

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [June 19, 2024, 3:13pm UTC](https://meta.discourse.org/t/how-to-setup-outgoing-discourse-mails-from-office365-exchange-for-notifications-without-using-smtp/312724/2 "2024-06-19T15:13:49Z")

</div>

There is no sending Discourse email without SMTP.

The easiest solution is to use something like mailgun. Your forum is on a different subdomain, so you’ll configure mailgun to use that rather than your apex domain that MS is handling.

If you don’t like that answer, set up your own self-hosted mail server again (which I do not recommmend, but you did it before, so you must know how to do it and why not to).
