Newsletters won't send on self-hosted Ghost site

After a lot of tinkering, I was finally able to get signup emails to send properly via the email service offered by fast comet (who is hosting my Ghost site). This finally solved my issue with Gmail users signing up and getting a magic link error.

That being said, when I try to send a test newsletter with the ‘Coming Soon’ post, it simply does not work, with the following error being displayed:

I tested the matter thoroughly, configuring different email accounts within the email settings, including the Mailgun configuration in the Ghost docs to the config.json file - the newsletter simply would not send out emails as intended. I further reviewed the Ghost email log, generated at:


However, the only error I am locating regarding the email service is the following:

{"name":"Log","hostname":"","pid":443976,"level":50,"version":"5.82.2","err":{"id":"f861f830-ff0a-11ee-a48c-490d9bbb0d49","domain":"","code":"BULK_EMAIL_SEND_FAILED","name":"EmailError","statusCode":500,"level":"normal","message":"Error sending email 6623a4feb0f6ad0dbbd79ba5","stack":"EmailError: An unexpected error occurred, please retry sending your newsletter.\n at BatchSendingService.emailJob (/home3/passage1/passages-of-play/versions/5.82.2/node_modules/@tryghost/email-service/lib/BatchSendingService.js:167:32)\n at BatchSendingService.sendBatches (/home3/passage1/passages-of-play/versions/5.82.2/node_modules/@tryghost/email-service/lib/BatchSendingService.js:386:19)\n at async BatchSendingService.sendEmail (/home3/passage1/passages-of-play/versions/5.82.2/node_modules/@tryghost/email-service/lib/BatchSendingService.js:213:9)\n at async BatchSendingService.emailJob (/home3/passage1/passages-of-play/versions/5.82.2/node_modules/@tryghost/email-service/lib/BatchSendingService.js:158:13)\n at async /home3/passage1/passages-of-play/versions/5.82.2/node_modules/@tryghost/job-manager/lib/JobManager.js:244:25\n at async JobManager.worker (/home3/passage1/passages-of-play/versions/5.82.2/node_modules/@tryghost/job-manager/lib/JobManager.js:16:22)","hideStack":false},"msg":"Error sending email 6623a4feb0f6ad0dbbd79ba5","time":"2024-04-20T11:41:47.700Z","v":0}

The actual error message reported in the log is:","code":"BULK_EMAIL_SEND_FAILED","name":"EmailError","statusCode":500,"level":"normal","message":"Error sending email 6623a4feb0f6ad0dbbd79ba5","stack":"EmailError: An unexpected error occurred, please retry sending your newsletter.

I investigated further and I located the following support thread:

Ghost Mail Problem - Support apps - YunoHost Forum

As per the above, I tested playing with the configuration settings, configuring port 25 and 587, respectively for unsecure SMTP and secure TLS, however, the error persisted. At this point, I am out of ideas as to why the newsletter does not operate, considering that the email service of the website is operational, as determined earlier by my testing.

The support team for FastComet believes this an issue that someone at Ghost would have better insight about fixing.

I believe there is an issue with your Mailgun configuration.

I remember, in another thread you mentioned that you tried setting up transactional emails via Mailgun – so the fact that you had issues with sending emails to Gmail when using Mailgun, but it works with fast comet’s email service, points towards an issue with Mailgun for me.

This error code is thrown in context of Ghost calling on Mailgun (or, specifically the “bulk email service”, which then calls Mailgun) to send a newsletter. So, another “symptom” that points towards your Mailgun configuration, in my eyes.

I’d be interested to know whether you see any logs in Mailgun?

From what I can tell, there is no information on the Mailgun dashboard at all. No record of sent emails, nothing in the logs, nothing except the DNS information I created and verified.

When setting up mailgun, I watched a tutorial video. In that video, a private API key was used when inputting an API into the Mailgun menu within Ghost. I never saw a private API key, and was advised to create one. I wonder if the issues begin with me not ever seeing a “private API key.”

When you go to your Mailgun API settings, you should see three things: “Verification public key”, “HTTP webhook signing key”, and “Mailgun API keys”.

It’s the last one that is relevant for Ghost – so yeah, if you don’t have one set up yet, you’ll need to create one (since Mailgun does not create one out-of-the-box).

Did you do that and is that the key you are using in Ghost?

This category of question is an FAQ on the forum. It stems from an unconventional configuration in Ghost, which requires configuring email twice, in two different places, for two different purposes.

Transactional email is configured in the config file and goes out usually via SMTP. It sounds like you got that working.

Bulk newsletter mail goes out through Mailgun. There’s a place in the admin area of Ghost to put in an API key, plus you have to set it on the Mailgun side.

There’s a good vault of posts here from people who have found they can send one type of email or not the other.

Ghost should make it easy to send out /all/ emails through Mailgun, so there’s just place to configure email!

1 Like

Verify my domain, create an Api key, put it where it should go with your country of creation and domain.

And nothing works. It’s crazy how hard it is to make it work.