As we discussed before Discourse is very popular and latest Forum software available in the market in present time.
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.
@Crunchify this looks good but don't use Gmail for outgoing forum emails, it violates their terms of service in a big way!
— Discourse (@discourse) April 12, 2016
@discourse Great. I've just setup Mailgun as my email server successful
Thanks for quick heads up.
— Crunchify (@Crunchify) April 28, 2016
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 Records
For 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 Now
button as per below screenshot - You should see
Green Checkbox
after 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
login
to your Linode or DigitalOcean node using SSH to modify discourse config file. - Once logged in you need to modify discourse
app.yml
file.
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 Name
to 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
to verify your email setting.
And you are all set
. Let me know if you face any issue while following above steps.
The post How to configure Mailgun Email Server on Discourse Forum correct way? – Detailed and Verified Steps appeared first on Crunchify.
Author: App Shah