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.

A post was split to a new topic: WordPress SMTP Olug-in Issue