Ghost is currently unable to send email

I need help please.

  • What’s your URL? This is the easiest way for others to debug your issue
  • What version of Ghost are you using?

5.44.0

  • What configuration?
    config.production.json
"mail": {
    "transport": "SMTP",
    "options": {
      "service": "Mailgun",
      "host": "smtp.mailgun.org",
      "port": 465,
      "secure": true,
      "auth": {
        "user": "postmaster@****************",
        "pass": "Mailgun SMTP password here"
      }
    }
  },
  • What browser?

Brave

  • What errors or information do you see in the console?

Log file shows the following:

{
  "name": "Log",
  "hostname": "aihe-blog",
  "pid": 57463,
  "level": 50,
  "version": "5.44.0",
  "err": {
    "id": "5b894060-e1c2-11ed-8ed9-6733d7017808",
    "domain": "https://blog.aihe.me",
    "code": null,
    "name": "EmailError",
    "statusCode": 500,
    "level": "normal",
    "message": "Failed to send email. Reason: Email has been temporarily rejected.",
    "context": "\"Unable to send welcome email, your site will continue to function.\"",
    "help": "\"Please see https://ghost.org/docs/config/#mail for instructions on configuring email.\"",
    "stack": "EmailError: Failed to send email. Reason: Email has been temporarily rejected.\n    at createMailError (/var/www/blog/versions/5.44.0/core/server/services/mail/GhostMailer.js:68:12)\n    at GhostMailer.handleDirectTransportResponse (/var/www/blog/versions/5.44.0/core/server/services/mail/GhostMailer.js:158:19)\n    at GhostMailer.send (/var/www/blog/versions/5.44.0/core/server/services/mail/GhostMailer.js:120:25)\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async /var/www/blog/versions/5.44.0/core/server/services/auth/setup.js:186:17",
    "hideStack": false
  },
  "msg": "Failed to send email. Reason: Email has been temporarily rejected.",
  "time": "2023-04-23T10:33:59.451Z",
  "v": 0
}

{
  "name": "Log",
  "hostname": "aihe-blog",
  "pid": 57463,
  "level": 50,
  "version": "5.44.0",
  "err": {
    "id": "b29f1af0-e1c2-11ed-8ed9-6733d7017808",
    "domain": "https://blog.aihe.me",
    "code": null,
    "name": "UnhandledJobError",
    "statusCode": 500,
    "level": "critical",
    "message": "Processed job threw an unhandled error",
    "context": "\"function\"",
    "help": "\"Please see https://ghost.org/docs/config/#mail for instructions on configuring email.\"",
    "stack": "EmailError: Failed to send email. Reason: Email has been temporarily rejected.\n    at /var/www/blog/versions/5.44.0/node_modules/@tryghost/job-manager/lib/job-manager.js:251:35\n    at createMailError (/var/www/blog/versions/5.44.0/core/server/services/mail/GhostMailer.js:68:12)\n    at GhostMailer.handleDirectTransportResponse (/var/www/blog/versions/5.44.0/core/server/services/mail/GhostMailer.js:158:19)\n    at GhostMailer.send (/var/www/blog/versions/5.44.0/core/server/services/mail/GhostMailer.js:120:25)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async ImportManager.importFromFile (/var/www/blog/versions/5.44.0/core/server/data/importer/import-manager.js:533:17)\n    at async /var/www/blog/versions/5.44.0/node_modules/@tryghost/job-manager/lib/job-manager.js:244:25\n    at async JobManager.worker (/var/www/blog/versions/5.44.0/node_modules/@tryghost/job-manager/lib/job-manager.js:16:22)",
    "hideStack": false
  },
  "msg": "Processed job threw an unhandled error",
  "time": "2023-04-23T10:36:25.507Z",
  "v": 0
}
  • What steps could someone else take to reproduce the issue you’re having?

Install ghost and try to setup using the details above.

I work for me with secureConnection instead of secure

"mail": {
    "transport": "SMTP",
    "options": {
      "service": "Mailgun",
      "port": 465,
      "secureConnection": true,
      "auth": {
        "user": "noreply@xxxxxxx.com",
        "pass": "xxxxxxxx-xxxxx-xxxxxxxxxxxxx"
      }
    }
},

You can try it and response.

Hi! Thank you.

Email is still not being sent.

Here is what I did.

  1. Changed secure to secureConnection like you suggested
  2. Then I tried the command ghost restart

So, you need to check your Mailgun logs (Mailgun dashboard) and sent support ticket to Mailgun team if they lock your account. Need to out sandbox.