Since there's a builtin Mailgun integration, do I need to update the code?

I’m having issues with both free and custom domain Mailgun setups. And I don’t know how to properly test it. Cause it keepts putting me on long timeouts. Do I need to do something other than put the domain and API key?

If you’d like some help debugging the problem, please provide some more details, and if you aren’t using managed hosting, please include your config.production.json (minus secrets)

Hi Cathy thanks for posting,
This night I changed the config file.
I addded a paid mailgun account and it worked, since the free tier is only allowing testing authorized recipients.
But the subscription email is not being sent, showing the “failed to send magic link” message.
I’m sharing my configs file below:

{
  "url": "https://xlipe.com",
  "server": {
    "port": 2368,
    "host": "127.0.0.1"
  },
  "database": {
    "client": "mysql",
    "connection": {
      "host": "127.0.0.1",
      "user": "ghost-663",
      "password": "pwhere",
      "database": "ghost1_prod"
    }
  },
  "mail": {
    "transport": "SMTP",
    "options": {
      "service": "Mailgun",
      "host": "smtp.mailgun.org",
      "port": "587",
      "secure": true,
      "auth": {
        "user": "postmaster@m.xlipe.com",
        "pass": "mypasswordishere"
      }
    }
  },
  "process": "systemd",
  "paths": {
    "contentPath": "/var/www/ghost1/content"
  }
}

This likely needs to be "secure": false.

The naming is confusing, it doesn’t mean the connection isn’t secure, it just means the initial connection is opened without SSL and then STARTTLS is used so your server and Mailgun’s servers can agree on a compatible cipher to open the secure connection.

3 Likes

Thank you! I changed it, restarted the app and now it’s working fine.

1 Like