https://github.com/discourse/discourse/blob/master/docs/INSTALL-email.md
I have been following these directions on setting up Discourse, but I noticed that for setting up my email, I need to have the email on the same domain of the discourse instance which will be a subdomain, rather than the main domain of the site. Is there a way around this?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Heya,
Yes, there is a way around this.
Discourse uses an email for a few different things:
The first step is to set up an SMTP server that Discourse can use to send out emails. This server can be with any provider (like Mailgun, SendGrid, etc.), and it doesn’t need to be on the same domain as your Discourse instance. You’ll need to get the SMTP server details from your provider and then use these details to configure Discourse’s email settings.
When you’re setting up the SMTP server with your provider, you’ll typically need to verify ownership of the domain you’re sending from. This will involve adding some DNS records. For example, you might need to add an SPF record to your DNS to allow the SMTP server to send emails on behalf of your domain, and a DKIM record to allow for verification of the emails.
Here’s an example of what you might need to add to your DNS:
These records allow Mailgun to send emails from your domain.
Then, in your Discourse settings, you’ll configure the SMTP server like this:
The
DISCOURSE_SMTP_USER_NAME
andDISCOURSE_SMTP_PASSWORD
settings should be the credentials that your email provider (Mailgun, in this example) gave you.Then, in your Discourse settings, set the notification email (the email that will be used as the “from” address for emails sent by Discourse) to something like no-reply@discourse.example.com.
As for receiving reply-by-email responses, this can be a bit trickier to set up, and it will depend on the capabilities of your email provider. You’ll need to create a catch-all email address (like replies@discourse.example.com) and then set up your email provider to forward all emails to this address to a specific Discourse endpoint.
Remember to always confirm the email setup by sending a test email from within Discourse. Also, bear in mind that the process can differ slightly depending on your email provider, but this should give you a general idea of what needs to be done.