Hello everyone,
I’m having an issue sending newsletters from my Ghost blog. For the past few days, my newsletter sends have been failing, and I’m getting the following error in my logs:
INFO [BULK_EMAIL_DB_RETRY] Sending email batch 6815e38b0359a7065b9c3bc0 - Retrying 4th try
[2025-05-03 11:47:02] WARN Missing mail.from config, falling back to a generated email address. Please update your config file and set a valid from address
[2025-05-03 11:47:02] INFO Sending email to 2 recipients
[2025-05-03 11:47:02] ERROR
NAME: EmailError
CODE: BULK_EMAIL_DB_RETRY
MESSAGE: [BULK_EMAIL_DB_RETRY] Sending email batch 6815e38b0359a7065b9c3bc0 - Failed (4th try)
"Mailgun Error 401: Forbidden"
The error redirects me to the newsletter documentation, but I’m having trouble identifying the exact solution.
Here’s what I’ve already checked:
- My Mailgun API key still seems to be active
- My domain is verified in my Mailgun account
- Emails (from, to, reply_to) are correct
Has anyone encountered this issue before and could guide me on how to fix it? Do I need to add a specific parameter in the configuration for the sending address?
Thank you in advance for your help!
Please share more about your hosting setup. How old is your mailgun account, and how long have you been sending? How many subscribers.
It’s a fresh install.
But the mailgun account is quite old (Flex plan). The blog domain is active on mailgun.
The blog is empty so the 2 recipients are just 2 emails of mine.
Ghost says the emails has been sent in the UI:
Hope this will help
Hi @camilleroux ,
You have to double check the config.production.json file.
is it this :
"mail": {
"transport": "SMTP",
"options": {
"service": "Mailgun",
"host": "smtp.eu.mailgun.org",
"port": 465,
"secure": true,
"auth": {
"user": "[your email]",
"pass": "[your pass]"
}
}
},
Best,
Hi Jeremie!
Thanks ! I’d got `“transport”: “direct”. So I changed it.
Adding the SMTP was helpful in solving another issue because I wasn’t receiving the 2FA email. But unfortunately, for sending emails when publishing an article, I’m still getting the same error in the logs:
ERROR
[2025-05-04 19:33:56] ERROR
NAME: EmailError
CODE: BULK_EMAIL_DB_RETRY
MESSAGE: [BULK_EMAIL_DB_RETRY] Sending email batch 6815e38b0359a7065b9c3bc0 - Failed (3rd try)
level: normal
"Mailgun Error 401: Forbidden"
"https://ghost.org/docs/newsletters/#bulk-email-configuration"
ERROR DETAILS:
"{\"error\":{\"status\":401,\"message\":\"Unauthorized\",\"details\":\"Forbidden\",\"type\":\"MailgunAPIError\"},\"messageData\":{\"to\":[\"***@***.com\",\"***@***.com\"],\"from\":\"\\\"Camille Roux\\\" <***@***.com>\",\"h:Reply-To\":\"***@***.com\",\"subject\": ...
EDIT: I forgot to add mg.
at the beginning of my Mailgun domain. It’s working now
1 Like