(Mailgun) Ghost not sending transactional emails

My transactional emails (signups, you name it) seem to be falling into a black hole. Newsletters don’t work either but that won’t matter if transactional mail isn’t setup. I don’t get any errors and the firewall is open; UFW is disabled entirely. I even added an explicit firewall rule on Google Cloud Console for egress on ports tcp:2525, tcp:465, and tcp:587. DNS is setup and verified through Mailgun.

What’s your URL? https://www.stardustrpg.com
What version of Ghost are you using? Latest, 4.11
How was Ghost installed and configured? Ubuntu 20.04 LTS, Google Cloud VM
What errors or information do you see in the console?

I don’t get any errors at all. Here is ghost log:

[2021-08-03 15:33:51] INFO "POST /members/api/send-magic-link/" 201 37ms

There are no logs on Mailgun’s end. I don’t think they’re even getting connected. I did a test email with SWAKS, following Mailgun’s documentation, and that worked just fine.

Here is config.production.json:

{
  "url": "https://www.stardustrpg.com",
  "server": {
    "port": 2368,
    "host": "127.0.0.1"
  },
  "database": {
    "client": "mysql",
    "connection": {
      "host": "localhost",
      "user": "REDACTED",
      "password": "REDACTED",
      "database": "REDACTED"
    }
  },
  "mail": {
    "from": "Stardust Automata <postmaster@automata.stardustrpg.com>",
    "transport": "SMTP",
    "options": {
      "service": "Mailgun",
      "host": "smtp.mailgun.org",
      "port": 587,
      "auth": {
        "user": "postmaster@automata.stardustrpg.com",
        "pass": "REDACTED"
      }
    }
  },
  "logging": {
    "transports": [
      "file",
      "stdout"
    ]
  },
  "process": "systemd",
  "paths": {
    "contentPath": "/var/www/stardust/content"
  }
}

It would help if I got any kind of error message but I just don’t…?

Hey!

Can you try to change the port below?

From 587 to 465?

Save the config file, restart Ghost and see if that fixes the issue?

Also I have just seen this guidance from Ghost:

And you said above you are using Google Cloud.

If port 465 doesn’t work, then try 2525.

I’ve tried all these ports.

I even added an explicit firewall rule on Google Cloud Console for egress on ports tcp:2525, tcp:465, and tcp:587.

Restarted Ghost each time. Have also tried many other permutations of the config.

I reverted to the default theme and noticed that it started working. Something is wrong with theme routing but I don’t know what, because this is still a problem with the standard Subscribe button. Still investigating.

Routes look fine. They’re the same as the default Casper theme.

More testing has shown that I can create a user and login as them. That magic link email works fine. The only one that doesn’t show up is a new signup.

Either fiddling with my personal email settings (no it wasn’t in spam) or the 100th ghost restart fixed this. Either way, I’m closing it.