How I configured Ghost for SMTP:

Hi. This took me about a day to figure out, so I thought I’d share it with others. I run a very small Ghost blog to offer training. I already have a mail server up and running that I administrate myself, with all the features (SPF/DKIM/DMARC) for improved deliverability. On the mail server, I created a login account specifically for my Ghost blog called ‘subscribe’.

I edited the config file in my Ghost directory to include this block of config data. Replace ‘example.com’ with your own domain name (the FROM address and the HOST domain name don’t need to be the same if you’re multi-homing eMail), and replace ‘subscribe’ with your desired account name.

"mail": {
    "transport": "SMTP",
    "from": "'Website Subscription' <subscribe@example.com>",
    "options": {
      "host": "mail.example.com",
      "port": "587",
      "secure": true,
      "auth": {
        "type": "LOGIN",
        "user": "subscribe",
        "pass": "password"
      }
    }
  }

The tricks for me were to use “secure: true” and “type: LOGIN” and port 587 to submit the eMails to my mail server (which is configured to use IMAPS and POP3s for authenticated client connections). One other snag was I used ‘subscribe@mail.example.com’ as the user, when I really only needed the bare user name.

I’m looking forward to the day when this can be configured through the admin GUI! :slight_smile:

Thanks again to the Ghost developers. I’ve been able to built a great looking website with very good functionality in a very short timeframe!

3 Likes

This is awesome! Thanks for sharing!