Ghost: Mailgun BATCH_SIZE with a fix value of 1000 is incompatible with new users
Issue Summary
Hi,
When you want to use Mailgun with the flex offer, they block your account to a maximum BATCH_SIZE to 10. This value is currently to defined to 1000 and cannot be overide with settings by the end user.
in bulk-email-processor.js :
module.exports = { BATCH_SIZE: MailgunClient.BATCH_SIZE,
Could be :
module.exports = { BATCH_SIZE: bulkEmailConfig?.mailgun?.batch_size,
A new setting to allow the users to set a BATCH_SIZE to 10 could be great to allow Mailgun to evaluate the mail quality before to increase to 1000 the batch size.
Thank-you !
Steps to Reproduce
- Create a ghost instance.
- Create a Mailgun account.
- Add 11 members to the newsletter
- Send a newsletter
- Mailgun will not accept more that 10 members in the recipient.
Ghost Version
v5.19.0
Node.js Version
v16.17.0
How did you install Ghost?
Ghost CLI + Ghost Update
Database type
MySQL 8
Browser & OS version
No response
Relevant log / error output
No response
Code of Conduct
- I agree to be friendly and polite to people in this repository
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 7
- Comments: 20 (9 by maintainers)
Commits related to this issue
- Added new unique tag to all mailgun requests refs: https://github.com/TryGhost/Ghost/issues/15725 - our users are having difficulties getting onboarded with mailgun - we're adding an explicit and un... — committed to ErisDS/Ghost by ErisDS 2 years ago
- Added new unique tag to all mailgun requests refs: https://github.com/TryGhost/Ghost/issues/15725 - our users are having difficulties getting onboarded with mailgun - we're adding an explicit and un... — committed to TryGhost/Ghost by ErisDS 2 years ago
- Added new unique tag to all mailgun requests refs: https://github.com/TryGhost/Ghost/issues/15725 - our users are having difficulties getting onboarded with mailgun - we're adding an explicit and un... — committed to aileen/Ghost by ErisDS 2 years ago
- Added `bulkEmail.batchSize` option to configure batch size refs https://github.com/TryGhost/Ghost/issues/15725 This pull request adds a new configuration option for the Mailgun email provider tha... — committed to TryGhost/Ghost by jakub-k-slys a year ago
We are actively talking to mailgun about how to make the onboarding process work more smoothly. I’ve raised this to them as, as far as I know, there is no way for us to auto-detect when the account is limited.
Hi there, has anyone found a resolution for this?
I have the exact same 420 error code that @alias-rahil got and when reaching out to mailgun they said I need 3-5 days of consistent sending with the following limits: “a maximum of 100 messages per hour, a maximum of 9 recipients per message”
I’ve changed the batch size to 1 as suggested by @dest4 but am limited by the 100 messages per hour because it somehow puts a 12-hour restriction on the account.
Waiting on a response from Mailgun about taking my handcuffs off but it seems impractical to start sending newsletters when the sole newsletter provider for Ghost is not conducive to this, especially when you’ve got existing subscribers to start with.
It would be great if we could make this configurable - I’m currently having the problem as well with only 37 subscribers…and I’m running Ghost in Docker so I can’t easily modify the code.
Knowing before trying that the account is limited is probably not possible. But once the call to Mailgun API fails, it seems to be possible to infer it.
Here are a couple of lines of log when sending fails due to account limitation
The
is not allowed to send large batches yetseems specific-enough. Though I don’t know how stable over time this heuristic can be.