# SMTP setting problem with Office365

**URL:** https://meta.discourse.org/t/smtp-setting-problem-with-office365/61630
**Category:** Self-hosting
**Created:** [April 26, 2017, 10:20am UTC](https://meta.discourse.org/t/smtp-setting-problem-with-office365/61630 "2017-04-26T10:20:44Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![ianwhite](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ianwhite/32/121793_2.png) [@ianwhite](https://meta.discourse.org/u/ianwhite)
#### Post date: [February 16, 2019, 11:52am UTC](https://meta.discourse.org/t/smtp-setting-problem-with-office365/61630/5 "2019-02-16T11:52:41Z")

</div>

I have been setting up an SMTP relay for an Office365 server, and eventually found the following combination to work. The setup on the O365 side was a whitelisted domain.

```
DISCOURSE_SMTP_ADDRESS: <yourdomainkey>.mail.protection.outlook.com
DISCOURSE_SMTP_PORT: 25
DISCOURSE_SMTP_DOMAIN: <yourdomain>
DISCOURSE_SMTP_ENABLE_STARTTLS_AUTO: true

```

Hope that helps.

---

_[View the full topic](https://meta.discourse.org/t/smtp-setting-problem-with-office365/61630)._
