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).

:old_key: To generate this password :

  1. Go to Sign in - Google Accounts
  2. Enter your regular password from your Google account (this is security settings)
  3. Select app, choose Other, and put the name (i.e SMTP)
  4. Now copy your password and write it down (you will have no chance to see it for the second time here)

For Ghost setup, I was using DO droplet, you could use a different way, but the whole flow should be similar or the same.

:e-mail: Now, to setup SMTP for your Ghost:

  1. Go to your project directory cd /var/www/ghost
  2. Open to edit your config.production.json
  3. Copy and paste config object for mail and fill user and pass with your creds
"mail": {
    "transport": "SMTP",
    "options": {
      "service": "Google",
      "host": "",
      "port": 587,
      "auth": {
        "user": "",
        "pass": "this password"

You could burn down the paper with this password .

As a result, all your transactional emails should work fine without any additional pain in the ass. For example, now you could invite somebody else as a content contributor to your website.

Originally published on How to setup basic SMTP for Ghost - DEV Community

1 Like