# Solution for privateemail configurations

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

<div class="post-metadata">

作者： ![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)\
发布日期： [2017 年10 月 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 😉

---

_[View the full topic](https://meta.discourse.org/t/solution-for-privateemail-configurations/71561)._
