# Discourse connects to the SMTP server but fails to send email through it

**URL:** <https://meta.discourse.org/t/discourse-connects-to-the-smtp-server-but-fails-to-send-email-through-it/174501>\
**Category:** Self-hosting\
**Created:** [December 29, 2020, 2:31pm UTC](https://meta.discourse.org/t/discourse-connects-to-the-smtp-server-but-fails-to-send-email-through-it/174501 "2020-12-29T14:31:36Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![DBHacker](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dbhacker/32/173072_2.png) [@DBHacker](https://meta.discourse.org/u/DBHacker)\
**Post date:** [January 6, 2021, 7:32am UTC](https://meta.discourse.org/t/discourse-connects-to-the-smtp-server-but-fails-to-send-email-through-it/174501/7 "2021-01-06T07:32:47Z")

</div>

> [@superman](#):
>
> Why is discourse ignoring the subdomain when the subdomain is not missing in the app.yaml file?

Did you forget to rebuild your container?

Anyway, you can check your container by:

```plaintext
docker exec -it app rails c

```

Then, from the rails console:

```plaintext
[1] pry(main)>ENV

```

You can look at all your SMTP environmental variables easily.

---

_[View the full topic](https://meta.discourse.org/t/discourse-connects-to-the-smtp-server-but-fails-to-send-email-through-it/174501)._
