I’m configuring emails for my discourse hosting. Discourse is hosted at discuss.xxxx.com.
I read in the documentation that for emails to work properly, we must verify and use the subdomain, e.g. discourse.example.com. So in my case sending domain must be discuss.xxxx.com
I’m using SendGrid to send emails and in SendGrid white label domains can not have the same name as one of the subdomains in DNS. So I’ll not be able to have discuss.xxxx.com as my verified sending domain.
I’m curious, can I set sending domain different than the discourse domain? I would prefer to set sending domain as forum@xxxx.com or forum.xxxx.com …what can be implications of this?
If your mail service is configured to send from the domain you use, it’s fine. You can change the address that Discourse sends from by changing the notification email setting.
For the chicken-egg case where you need to receive email to gain access to your Discourse installation, you can edit the bottom of app.yml that looks like this:
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='info@unconfigured.discourse.org'"
- exec: echo "End of custom commands"
You can edit app.yml with nano to set the notification_email setting. At the bottom, you’ll see this:
- 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='info@unconfigured.discourse.org'"
- exec: echo "End of custom commands"