# SMTP server connects, mail fails to send

**URL:** https://meta.discourse.org/t/smtp-server-connects-mail-fails-to-send/135096
**Category:** Self-hosting
**Created:** [December 4, 2019, 9:38pm UTC](https://meta.discourse.org/t/smtp-server-connects-mail-fails-to-send/135096 "2019-12-04T21:38:02Z")
**Posts on this page:** 1
**Showing post:** 11

<div class="post-metadata">

### Author: ![dgtal1](https://avatars.discourse-cdn.com/v4/letter/d/e9bcb4/32.png) [@dgtal1](https://meta.discourse.org/u/dgtal1)
#### Post date: [January 14, 2021, 1:36pm UTC](https://meta.discourse.org/t/smtp-server-connects-mail-fails-to-send/135096/11 "2021-01-14T13:36:10Z")

</div>

Hi everyone,  
Did anyone find a solution to this?  
I’ve setup postfix on my docker host for outgoing emails. It works fine when I send emails from ssh via the `mail` command, but discourse docker is failing with the same error as the OP got. I’ve used a hint from this thread: [How to set SMTP config to use localhost?](https://meta.discourse.org/t/how-to-set-smtp-config-to-use-localhost/131464) and thanks to that I got rid of authentication error from discourse docker (I do not provide any user/password to discourse docker to connect to my email server) , but now getting ‘sending mail failed’. Any ideas?

I had no idea that setting up an email server would be the hardest part in my discourse journey… ☹ The discourse install is just flawless and so well thought unlike any linux email server setup.

Thanks in advance!

---

_[View the full topic](https://meta.discourse.org/t/smtp-server-connects-mail-fails-to-send/135096)._
