Configuring SMTP with FastMail

I am attempting to setup SMTP using my fastmail account. I helpfully found this blog post, but these settings do not seem to work anymore.

I’ve tried a number of combinations of port, and security requirements, but thus far no luck. Here’s my current mail config from my config.production.json

"mail": {
    "from": "nick@nickbodmer.com",
    "transport": "SMTP",
    "options": {
      "service": "FastMail",
      "host": "smtp.fastmail.com",
      "port": 465,
      "secureConnection": true,
      "requiresAuth": true,
      "auth": {
        "user": "nick@nickbodmer.com",
        "pass": "PASSWORD"
      }
    }
  },

When I check the logs, I find this SMTP error: “Failed to send email. Reason: Message failed: 551 5.7.1 Not authorised to send from this header address.”

I’ve opened a ticket with FastMail but I thought I’d check here as well to see if anyone has gotten this working.

I’ve not used Fastmail with Ghost, but thought I’d check that you’ve set an application-specific password.

Yep, I’m using an app specific password (I edited it out of the above code)

:sweat_smile:Hey, is this issue solved? If so, can you show me the way? I got the same issue.

I suspect it may be an SPF issue based on the error returned by Fastmail. Make sure the domain has an SPF record that includes Fastmail’s server.

This may have been solved by others but I was dealing with a similar issue with Fastmail and a self hosted ghost instance. I found in the ghost admin panel “portal settings” > “account page” that the support email address wasn’t the email address I was trying to send from. Once I switched that email address it started working for me.