Gmail signups/subscribers not working

Just created a self-hosted Ghost instance using FastComet. Everything working fine with the exception of the email system. I thought it was totally broken because I was only using my gmail accounts to do test signups, but when I tried an AOL email, it worked!

However, if I try with an @gmail account, I get the following error:

Failed to send magic link email

So I guess I discovered that @gmail accounts aren’t going through for some reason. I’d like to figure out how to fix that.

Below is my json file:

{
    "database": {
        "client": "mysql",
        "connection": {
            "host"     : "#",
            "user"     : "root",
            "password" : "",
            "database" : "ghost"
        }
    },
    "paths": {
        "contentPath": "content/"
    },
    "logging": {
        "level": "info",
        "rotation": {
            "enabled": true
        },
        "transports": ["file", "stdout"]
    }
}

  "mail": {
  "transport": "SMTP",
  "options": {
    "service": "Mailgun",
    "auth": {
      "user": "email",
      "pass": "password"
    }
  }
},

That’s strange. I’d expect it to either work or not, if you’re routing through Mailgun, not to depend on destination address.

Just to confirm: you restarted Ghost after changing your json file, right?

The documentation has a few fields you’re missing for Mailgun. See here:

Is there anything informative in the Ghost logs on the server when you try to trigger a magic link?

You may also want to try testing with SWAKS, to see if mailgun is working outside of Ghost. It’s possible that FastComet is blocking outbound email.

Just to confirm: you restarted Ghost after changing your json file, right?

I’m afraid I don’t know how to do that. I see a lot of people making changes to their .json files with a terminal application but I’m just using old-fashioned FTP/Filezilla. I know the updated .json is the active one.

The documentation has a few fields you’re missing for Mailgun. See here:

I take it you mean the secure/port bits? I can add those.

Is there anything informative in the Ghost logs on the server when you try to trigger a magic link?

I’m not entirely sure how to look into this. Again from the perspective that I am not using terminal so I’d need the instructions for how to look at logs by using FTP.

You may also want to try testing with SWAKS, to see if mailgun is working outside of Ghost. It’s possible that FastComet is blocking outbound email.

I am receiving emails on AOL and also the FastComet rep was able to get it to work successfully. It seems to be just @gmail accounts that don’t go through.

I don’t know enough about FastComet to know if this is your problem, but on most self-hosted installs (not Ghost Pro), you’ve got shell access, and you need to ssh in and tell the server to restart for it to read the file. But FastComet might be different - you might want to askt them.

Thing is, this doesn’t really pinpoint why email signup/delivery works for all email accounts except Gmail.

Agreed. I’d expect that if the handoff to mailgun is working, you wouldn’t be getting errors from trying to send the magic link in the Ghost portal window. (That bounce would happen too late for the browser to see it.)

That contradiction is what led me to wonder if your config file was what Ghost was actually using and my suggestion to make sure you’d rebooted. I apologize if you don’t feel like that’s on-point to your problem.

Since you report that Ghost is set up to deliver through Mailgun, a reasonable next step would be to log in to Mailgun and see if there’s any record of the problem there. I assume you’ve already followed Mailgun’s configuration steps and set up and recommended DNS entries to make your email deliverable. Gmail is very picky about DKIM, SPF, and DMARC, so maybe you’ll see details about any bounces from Gmail that’ll help you find the problem.

[If you don’t see any record of the failures OR successful deliveries, you might want to revisit the possibility that your outbound email is not actually going through Mailgun.]