Introduction

If your Ghost setup can't send transactional emails - such as user invites and password resets - then you probably haven't configured your mail settings correctly.

It's worth noting that the following information is for a basic SMTP setup using Gmail. This is fine for my site because I don't offer memberships or have multiple users - it's just me. If your site has lots of users then you may need to look for a premium solution, such as Mailgun.

Step 1: Create Gmail app password

  1. Go to https://myaccount.google.com/apppasswords and login (if you cannot create an app password you may need to enable 2FA first)
  2. Enter an app name that's easy to remember (e.g. Ghost SMTP)
  3. Copy your password and write it down (once you close the popup you won't be able to see it again)

Step 2: Update Ghost mail config

  1. Go to your project directory cd /var/www/ghost
  2. Open and edit config.production.json
  3. Copy and paste the below config, replacing user and pass with your own credentials:
"mail": {
    "transport": "SMTP",
    "options": {
      "host": "smtp.gmail.com",
      "port": 587,
      "auth": {
        "user": "mygmailaccount@gmail.com",
        "pass": "your APP password"
      }
    }
  },

4. Restart Ghost

Conclusion

Hopefully, that should fix your SMTP issues and allow you to send password reset requests, etc. Don't do what I did and accidentally type smtp.google.com instead of smtp.gmail.com and then spend ages trying to figure out why it didn't work.

If you are still having issues, on my search for answers I did find some people had issues with Digital Ocean (DO) locking down port 587. This site is hosted on DO and I didn't have that issue, but if it is for you then that might be a good place to start.

Resources

Here are some threads and posts that I found useful on my quest to solve this issue:

How to deliver Ghost emails from your local dev setup
How to get Ghost sending mail from your development install, without a whole lot of extra fuss.
How to setup basic SMTP for Ghost
Disclaimer I’ve just started to use Ghost as a platform for blogs. Before that, I’ve been…
How to setup basic SMTP for Ghost
How to setup basic SMTP for Ghost Almost everybody has Gmail, right? But a small amount of those knows, that it also includes free SMTP service, which is the same as other Google products: fast&reliable. Everything you need is your email and dedicated app password (for security reasons). 🗝 To gen…