MailGun authentification failed


We are using a Ghost-cli CMS on Ubuntu server using DigitalOcean and with “domain” on OVH.

Ghost encourages us to use Mailgun to send newsletters through SMTP.

We created an account on MailGun, added our server “”, which automatically created a “postmaster[]” adress with password. Changed DNS to match MailGun.

We changed our “config.production.json” file from our Ghost-cli server-side to match with the SMTP credentials… But it doesn’t seem to work.

We also tried to add Mailgun info on Ghost Admin, but still fails.

The current error message is " Error sending email: Failed to send email. Reason: Invalid login: 535 Authentication failed. "

We’ve been through a lot of posts on this forum and followed their suggestions… In vain.

We tried to reset password from “postmaster[]” and update the credentials on “config.production.json” and on the Ghost Admin-side… But still has the same error.

Furthermore, we would like to understand clearly if it is with a “postmaster[]” adress that we can link to our Ghost Admin… And if (and how) we can then add new e-mail adresses both on Mailgun and Ghost Admin (such as “contact[]” for “support account” and “newsletter[]” for “newsletters”).

Our site is located on

config.production.json on server (restarted Ghost of course) :

"mail": {

    "from": "'Postmaster OART' <>",

    "transport": "SMTP",

    "options": {

      "service": "Mailgun",

      "host": "",

      "port": 587,

      "secure": false,

      "auth": {

        "user": "",

        "pass": "ourkeypass"




Thanks in advance,

You should use region-specific endpoint for mailgun, like Check out my answer here: Ghost service reliably crashes when sending transaction email test - #7 by rozhok