Solution for privateemail configurations

AI-generated summary

The discussion revolves around finding a solution for configuring privateemail with Discourse. Mohamed_farahat shared their experience and finally found the solution after a month of investigation. The main issue was with the ‘from’ field, which Discourse defaults to noreply@yourdomain.com, but privateemail SMTP server requires the mailbox address. To solve this, Mohamed_farahat provided steps to adjust the containers/app.yml file, including using port587, uncommenting DISCOURSE_SMTP_ENABLE_START_TLS, and setting the notification_email to the mailbox address. Other users, such as anon23840344, llc1990, Enrico_Enrico, Reliant313, and ascension.forum, have confirmed the solution works and suggested it should be included in the official documentation. The solution is still working as of June4,2025.

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”. 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 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

  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

## 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 :wink:

훌륭한 작업입니다. 감사합니다. 공식 문서에 반영되어야 합니다. 감사합니다.

containers/app.yml 파일의 위치를 모르는 초보자를 위해 전체 경로를 알려 드립니다: /var/discourse/containers/app.yml

같은 문제에 대한 해결책을 4시간 정도 찾아보고 있습니다.
이 부분이 문서에 포함되는 것이 맞다고 생각합니다.
정말 부탁드립니다.

이 게시물은 5년이 지난 지금도 여전히 문제를 해결해 주고 있습니다. 이렇게 공유해 주셔서 정말 감사합니다.

2025년 6월 4일 기준으로 여전히 정상 작동하는 것을 확인했습니다 :smiley: