1 min read

Set up Gmail SMTP server for Ghost

Set up Gmail SMTP server for Ghost

Ghost needs additional setting after installation in order to send emails ; for password resets, user invitations, system notifications, and other features. Although there are many SMTP server options such as mailgun, I chose Gmail as ghost website’s SMTP server because it is free. I bet those who are reading this article think the same!

The mail configuration is not change but here you will find steps how to configure your ghost mail with Google Workspace or Gmail account:

Configure Gmail SMTP server

Refer to this article. It has pictures and is easy to follow!

  1. Enable Two-Step Authentication In Gmail
  2. Create App Password In Gmail

Configure in Ghost

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

Configure Your email settings inside the config.production.json file. You add the code below just after the database section.

su - <user>
cd /var/www/ghost
vim config.production.json

---
  "mail": {
    "from": "[email protected]",
    "transport": "SMTP",
    "options": {
      "host": "smtp.gmail.com",
      "service": "Gmail",
      "port": "465",
      "secure": true,
      "auth": {
        "user": "[email protected]",
        "pass": "Your App Password"
      }
    }
  },
---

Restart Ghost

In order for your settings changes to take effect, you'll want to restart. Just restart Ghost/Docker container and the config should get loaded.

ghost restart

Now you can send email using Outgoing Mail (SMTP) Server.