Want to receive post like these in your inbox? You can subscribe! It's free.

One of the best feature Ghost blog provides is to send out self hosted newsletter without relying on any third party software and without any hidden costs.

On top that, setting up newsletter service for you Ghost blog is as easy as adding a few configuration lines and making an account on Mailgun.

Lets dive into it and see how we can setup mailgun in 4 easy steps.

Make an account on Mailgun

To send subscription emails and newsletters on Ghost blog you will need to configure mail sending API's to your ghost blog. Ghost recommends Mailgun so we are going to use that. Lets start by creating an account.

Mailgun Technologies
Powerful Transactional Email APIs that enable you to send, receive, and track emails, built with developers in mind. Learn more today!

Add sending/receiving DNS records

After creating an account, add a domain to Mailgun and create new DNS records on your DNS providers dashboard.

Add the mail configuration to your Ghost config file

Next, you'll need to modify the Ghost configuartion on the Digital Ocean cloud.

(1) Open the terminal and login into your droplet

ssh root@your_droplet_ip

(2) Change to user to be ghost admin

sudo -i -u ghost-mgr

(3) Open the production config file location in the main folder

nano /var/www/ghost/config.production.json

(4) Add the mailing config

    "mail": {
        "from": "Your name <noreply@your_domain>",
        "transport": "SMTP",
        "options": {
            "service": "Mailgun",
            "host": "smtp.mailgun.org",
            "port": 465,
            "secureConnection": true,
            "auth": {
                "user": "your_user_name",
                "pass": "your_password"

Add the email newsletter settings in the Ghost admin dashboard

To start sending out bulk emails you will need to provide your Mailgun API key to Ghost. For this note the API key from Mailgun dashboard located on Dashboard -> API Keys.

Once you have that key go to your Ghost admin dashboard and expand the labs -> Email newsletter settings. Add the Mailgun Domain and Mailgun API key.

That is all you need to send out newsletters and other email using your Ghost blog. You can send test emails to see if it all works together or not.

This is the fourth post in the "Setting up a Ghost blog" series.

Checkout the road map

  1. How to self deploy a Ghost blog in 3 easy steps
  2. Setting up free image hosting for your Ghost blog (Cloudinary)
  3. Setting up Cloudflare CDN and analytics for your Ghost blog
  4. Configuring mailgun on Ghost blog and sending out your first newsletters!
  5. Easiest way to customize a theme for your Ghost blog