# ¿SMTP con Office365?

**URL:** <https://meta.discourse.org/t/smtp-with-office365/77467>\
**Category:** Self-hosting\
**Tags:** email\
**Created:** [8 Enero, 2018 11:57 UTC](https://meta.discourse.org/t/smtp-with-office365/77467 "2018-01-08T11:57:45Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Chopper](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chopper/32/57073_2.png) [@Chopper](https://meta.discourse.org/u/Chopper)\
**Post date:** [8 Enero, 2018 11:57 UTC](https://meta.discourse.org/t/smtp-with-office365/77467/1 "2018-01-08T11:57:45Z")

</div>

Hello

I try to use Office365 as SMTP for discourse. I’m already using this account for my wordpress SMTP so the account is not the problem.

When i try to send a email test, an error message appear

> [Sender] 504 5.7.4 Unrecognized authentication type [[AM3PR05CA0123.eurprd05.prod.outlook.com](http://AM3PR05CA0123.eurprd05.prod.outlook.com)]

This is my SMTP config from app.yml

```
## TODO: The SMTP mail server used to validate new accounts and send notifications
DISCOURSE_SMTP_ADDRESS: smtp.office365.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: test@example.fr
DISCOURSE_SMTP_PASSWORD: password
DISCOURSE_SMTP_AUTHENTICATION: login
DISCOURSE_SMTP_ENABLE_START_TLS: false 

```

Any idea how to fix the problem ?

Another config:

```
## TODO: The SMTP mail server used to validate new accounts and send notifications
DISCOURSE_SMTP_ADDRESS: smtp.office365.com
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: test@example.fr
DISCOURSE_SMTP_PASSWORD: password
DISCOURSE_SMTP_AUTHENTICATION: login
DISCOURSE_SMTP_ENABLE_START_TLS: true

```

I get the following error:

> 550 5.7.60 SMTP; Client does not have permissions to send as this sender

**The problem is from Discourse** , because I can test with swaks and it’s working

```
swaks --to test@example.com --from test2@example.com --server smtp.office365.com --auth login --auth-user test2@example.com -tls

```

---

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