Getting Emails working in Ghost

Getting Emails working in Ghost
Photo by Mariia Shalabaieva / Unsplash

Getting transactional emails working in Ghost CMS has been the trickiest part of the self-hosting installation. I ended up moving off of DigitalOcean as they have ports 25,465 & 587 shut whereas Azure will allow you use 587 outbound.

However, even when I tried setting up transactional emails with Mailgun using the Ghost configuration guide I just saw errors in the logs.

After much testing, I finally got it to work, the working configuration is:

"mail": {
    "transport": "SMTP",
    "options": {
      "host": "smtp.eu.mailgun.org",
      "port": 587,
      "auth": {
        "user": "mailgun-email-user@domain",
        "pass": "mailgun-password-goes-here"
      }
    }
  },

It turns out the "service": "Mailgun" option in the config actually has an effect on the config and isn't just a name field. removing that ands putting the port to 587 allowed the emails to connect.