# What does DISCOURSE\_SMTP\_DOMAIN mean?

**URL:** https://meta.discourse.org/t/what-does-discourse-smtp-domain-mean/229009
**Category:** Self-hosting
**Tags:** email
**Created:** [June 4, 2022, 1:34pm UTC](https://meta.discourse.org/t/what-does-discourse-smtp-domain-mean/229009 "2022-06-04T13:34:24Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)
#### Post date: [June 4, 2022, 1:34pm UTC](https://meta.discourse.org/t/what-does-discourse-smtp-domain-mean/229009/1 "2022-06-04T13:34:24Z")

</div>

While already having `DISCOURSE_SMTP_ADDRESS`, what does the `DISCOURSE_SMTP_DOMAIN` setting in `containers/app.yml` do?

It’s not that desktop clients usually ask for “address” and “domain” separately, so I got confused.

---

<div class="post-metadata">

### Author: ![icaria36](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/icaria36/32/426431_2.png) [@icaria36](https://meta.discourse.org/u/icaria36)
#### Post date: [January 10, 2023, 7:53am UTC](https://meta.discourse.org/t/what-does-discourse-smtp-domain-mean/229009/2 "2023-01-10T07:53:52Z")

</div>

I have the same question. I searched for an answer and I found this topic.

More specifically I wonder whether here we should put the same subdomain the Discourse instance has ([discourse.example.com](http://discourse.example.com)) or the domain ([example.com](http://example.com)). And whether this is something related to the SMTP configuration at all.

---

<div class="post-metadata">

### Author: ![thoka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thoka/32/115652_2.png) [@thoka](https://meta.discourse.org/u/thoka)
#### Post date: [September 2, 2023, 7:07am UTC](https://meta.discourse.org/t/what-does-discourse-smtp-domain-mean/229009/3 "2023-09-02T07:07:10Z")

</div>

> [@meglio](#):
>
> SMTP\_ADDRESS

It is passed directly to action\_mailer

> <https://github.com/discourse/discourse/blob/38230970ea2f4426b3fdda2a74a168314f27c81a/config/environments/production.rb#L27-L47>

[Actions\_Mailer’s Docs](https://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration) designate it as a part of [SMTP conversation](https://www.ibm.com/docs/en/zos/2.2.0?topic=sc-helo-command-identify-domain-name-sending-host-smtp).

---

<div class="post-metadata">

### Author: ![icaria36](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/icaria36/32/426431_2.png) [@icaria36](https://meta.discourse.org/u/icaria36)
#### Post date: [March 20, 2025, 1:47pm UTC](https://meta.discourse.org/t/what-does-discourse-smtp-domain-mean/229009/4 "2025-03-20T13:47:42Z")

</div>

Is there a reason why this line in app.yml

`DISCOURSE_SMTP_DOMAIN: discourse.example.com # (required by some providers)`

isn’t asked during `./discourse-setup` and it isn’t commented either, introducing a false value in the configuration?

---

<div class="post-metadata">

### Author: ![icaria36](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/icaria36/32/426431_2.png) [@icaria36](https://meta.discourse.org/u/icaria36)
#### Post date: [March 20, 2025, 2:13pm UTC](https://meta.discourse.org/t/what-does-discourse-smtp-domain-mean/229009/5 "2025-03-20T14:13:07Z")

</div>

In case it helps future readers…

> [@icaria36](#):
>
> I wonder whether here we should put

Replying to myself 😅 based on [Emails have stopped sending - end of file reached - #25 by Falco](https://meta.discourse.org/t/emails-have-stopped-sending-end-of-file-reached/176486/25), you need to add your mail domain i.e. `mail.example.com`.
