Configure SMTP For Outbound Emails (Ghost SMTP Setup)

  1. Transactional Email: This email setup is used for sending out ghost system emails such as member sign in/up emails, Admin Invite or Password reset emails
  2. Newsletter Email: for sending out posts to your members.

In this article I will go for the Transactional email. To setup emails you will need a SMTP server. I am Using SendGrid for the guide.

Step 1

Login in to your server

ssh user@yourserverip	

Step 2

When setting up SMTP email sending for Ghost, you only need to make an edit to the config.production.json file.

Access the file by running this command:

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

Step 3

Within the file replace

"mail": {
    "transport": "Direct"
  },

with

"mail": {
    "from": "email@example.com",
    "transport": "SMTP",
    "options": {
        "host": "smtp.sendgrid.net",
        "port": 587,
        "auth": {
            "user": "apikey",
            "pass": "enter-your-api-key-here"
        }
    }
},

Save the file

Step 4

In order for your settings changes to take effect, restart the ghost instance using the following command

ghost restart

Boom! you have successfully configured SMTP for your ghost publication

Checkout https://spookey.io for managed ghost publication.