Quantcast
Channel: Crunchify
Viewing all articles
Browse latest Browse all 1037

How to configure Mailgun Email Server on Discourse Forum correct way? – Detailed and Verified Steps

$
0
0

Mailgun and Discourse Email Setup

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.

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.

Add your domain to Mailgun Admin Panel

Step-3

  • Next you need to Add DNS Records For Sending. TXT records (known as SPF & DKIM) are required to send email through Mailgun.
  • Go to your primary domain’s cPanel.
  • Click on Advanced Zone Editor.
  • Add below 2 TXT records.

Advanced Zone Editor and Crunchify Forum Mailgun Email TXT records

Step-4

  • Click on Check DNS Records Now button as per below screenshot
  • You should see Green Checkbox after successful verification

Add Mailgun TXT records to your zone file using cPanel - ask.crunchify forum email setup tips

Step-5

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

ask.crunchify.com is now verifided domain with Mailgun

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:

  1. Visit https://mailgun.com/app/domains
  2. 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.

Discourse Notification Email Setting - Crunchify Tips

Step-9

Go to Email tab to verify your email setting.

Verify Mailgun Setup with Discourse Forum - Crunchify Tips

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

Have a suggestion or anything to add to this article? Chime in and share as a comment OR post it in forum.

The post How to configure Mailgun Email Server on Discourse Forum correct way? – Detailed and Verified Steps appeared first on Crunchify.
Author: App Shah

Viewing all articles
Browse latest Browse all 1037

Trending Articles