# Solution for privateemail configurations

**URL:** https://meta.discourse.org/t/solution-for-privateemail-configurations/71561
**Category:** Self-hosting
**Created:** [2017年十月7日 00:13 UTC](https://meta.discourse.org/t/solution-for-privateemail-configurations/71561 "2017-10-07T00:13:15Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Mohamed\_farahat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mohamed_farahat/32/120493_2.png) [@Mohamed\_farahat](https://meta.discourse.org/u/Mohamed_farahat)
#### Post date: [2017年十月7日 00:13 UTC](https://meta.discourse.org/t/solution-for-privateemail-configurations/71561/1 "2017-10-07T00:13:16Z")

</div>

several users tried to configure Discourse with `privateemail` without luck including me. you can read more about this problem here “[https://meta.discourse.org/t/cant-get-admin-email-to-send-working-with-using-namecheap-email-server/57423](https://meta.discourse.org/t/cant-get-admin-email-to-send-working-with-using-namecheap-email-server/57423)”. but after a month of investigations, i finally found the solution.

the main problem was the “from” field  
discourse by default use [noreply@yourdomain.com](mailto:noreply@yourdomain.com) for notification emails but privateemail SMTP server needs the mail address of the mailbox you have.

there is no why to solve this issue while installation @codinghorror so after installation you have to re-open `containers/app.yml` file and make the following adjustments.

### SMTP Configurations

```plaintext
  DISCOURSE_SMTP_ADDRESS: mail.privateemail.com
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: mailBox@yourdomain.com
  DISCOURSE_SMTP_PASSWORD: " ****************"
  #DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)

```

1- use port 587  
2- use your mailbox address instead of `mailBox@yourdomain.com`  
3- uncomment `DISCOURSE_SMTP_ENABLE_START_TLS` and set it to `true`

### Notification E-Mails Configurations

At the end of the file you would find

```plaintext
## Any custom commands to run after building
run:
  - exec: echo "Beginning of custom commands"
  ## If you want to set the 'From' email address for your first registration, uncomment and change:
  ## After getting the first signup email, re-comment the line. It only needs to run once.
  #- exec: rails r "SiteSetting.notification_email='mailBox@yourdomain.com'"
  - exec: echo "End of custom commands"

```

1- uncomment `- exec: rails r "SiteSetting.notification_email='mailBox@yourdomain.com'"`  
2- use your mailbox address instead of `mailBox@yourdomain.com`

now `./launcher rebuild app` and have fun 😉

---

<div class="post-metadata">

### Author: ![anon23840344](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@anon23840344](https://meta.discourse.org/u/anon23840344)
#### Post date: [2020年八月17日 02:53 UTC](https://meta.discourse.org/t/solution-for-privateemail-configurations/71561/2 "2020-08-17T02:53:55Z")

</div>

干得漂亮，谢谢。这应该被纳入官方文档。祝好。

---

<div class="post-metadata">

### Author: ![llc1990](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/llc1990/32/184360_2.png) [@llc1990](https://meta.discourse.org/u/llc1990)
#### Post date: [2020年八月18日 06:46 UTC](https://meta.discourse.org/t/solution-for-privateemail-configurations/71561/3 "2020-08-18T06:46:03Z")

</div>

对于不知道在哪里找到 `containers/app.yml` 的新手，这里是完整路径：`/var/discourse/containers/app.yml`

---

<div class="post-metadata">

### Author: ![Enrico\_Enrico](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/enrico_enrico/32/201094_2.png) [@Enrico\_Enrico](https://meta.discourse.org/u/Enrico_Enrico)
#### Post date: [2020年十一月29日 15:58 UTC](https://meta.discourse.org/t/solution-for-privateemail-configurations/71561/4 "2020-11-29T15:58:57Z")

</div>

我已经为同样的问题寻找解决方案大约 4 个小时了。  
我同意这应该被包含在文档中。  
真的，拜托了。

---

<div class="post-metadata">

### Author: ![Reliant313](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@Reliant313](https://meta.discourse.org/u/Reliant313)
#### Post date: [2023年九月28日 23:14 UTC](https://meta.discourse.org/t/solution-for-privateemail-configurations/71561/5 "2023-09-28T23:14:42Z")

</div>

这篇文章在 5 年后仍然解决了问题。非常感谢您的分享。

---

<div class="post-metadata">

### Author: ![ascension.forum](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@ascension.forum](https://meta.discourse.org/u/ascension.forum)
#### Post date: [2025年六月5日 03:30 UTC](https://meta.discourse.org/t/solution-for-privateemail-configurations/71561/6 "2025-06-05T03:30:03Z")

</div>

Confirmed this is still working as of 6/4/2025 😃
