
As we discussed before Discourse is very popular and latest Forum software available in the market in present time.
Note: In 2023, we have decommed Crunchify Forum. But the steps and motive still remains the same if you would like to create your own forum.
Visit Forum here: https://ask.crunchify.com.
When I posted a detailed article on Crunchify on how to setup GMail SMTP-relay service for Discourse sometime back, @Discourse immediately found out and suggested NOT to use Gmail as an email service provider.
Take a look at below tweets.
As per suggestion, I’ve choose Mailgun as my email server. In this tutorial we will go over details on how to setup Mailgun with Discourse correct way and make sure your email service is running fine.
Why Mailgun?
Mailgun is a service backed by Rackspace's solid foundation. It allows your to send 10,000 emails/month, i.e. ~333 emails/day. I would say, that’s enough at-least for me on ask.crunchify.com 🙂
- How to Switch Discourse from Mandrill to Mailgun?
- What are the recommended Email Service Providers for Discourse?
- How to Send an Email from a Discourse Instance?
Let’s get started:
Step-1
Signup for Mailgun email service.
Step-2
Once signup, on next screen you need to add your forum domain name.

Step-3
- Next you need to Add
DNS RecordsFor Sending.TXT records(known as SPF & DKIM) arerequired to send email through Mailgun. - Go to your primary domain’s
cPanel. - Click on
Advanced Zone Editor. - Add below 2
TXT records.

Step-4
- Click on
Check DNS Records Nowbutton as per below screenshot - You should see
Green Checkboxafter successful verification

Step-5
Next you should receive an email from Mailgun with subject: Good news - ask.crunchify.com is now verified.

Step-6
- Now
loginto yourLinodeorDigitalOceannode using SSH to modify discourse config file. - Once logged in you need to modify discourse
app.ymlfile.
Here are commands:
$ cd /var/discourse $ vi containers/app.yml
Just update below 3 properties into your app.yml file:
DISCOURSE_SMTP_ADDRESS: smtp.mailgun.org DISCOURSE_SMTP_USER_NAME: postmaster@ask.crunchify.com DISCOURSE_SMTP_PASSWORD: 6ca9adfadf1c9d98adfadffwea679eadc1 # Below two properties are not required. You could also remove below 2 lines # DISCOURSE_SMTP_PORT: # DISCOURSE_SMTP_ENABLE_START_TLS:
You should be able to get your username and password by following below steps:
- Visit
https://mailgun.com/app/domains - Click on your
Domain Nameto see default SMTP login and password
Step-7
Restart your Discourse App using below commands.
$ git pull $ ./launcher rebuild app
It may take upto ~5 minutes based on how powerful your server is.
Step-8
Once your forum is up and running to to Setting and modify notification email which should match with your Mailgun domain name.

Step-9
- Go to
Email tab - Click on Settings
- Provide your email address
- And verify your email setting

And you are all set. Let me know if you face any issue while following above steps.
