Hi, I get this error whenever I try to send newsletter. Can anybody please help me to fix this?
Have you set up a payment method in your Mailgun account?
You may get more details about the error if you look in your server side logs, there are details for how to do that in the docs:
Yes, I’ve set up payment method in Mailgun. And this is my error log
[2019-12-09 16:24:16] WARN
NAME: InternalServerError
MESSAGE: The server has encountered an error.
level: normal
"The email service was unable to send an email batch."
InternalServerError: The server has encountered an error.
at new GhostError (/var/www/ghost/versions/3.1.1/core/server/lib/common/errors.js:10:26)
at /var/www/ghost/versions/3.1.1/core/server/services/bulk-email/index.js:103:45
at Request.callback (/var/www/ghost/versions/3.1.1/node_modules/async/dist/async.js:4617:26)
at IncomingMessage.<anonymous> (/var/www/ghost/versions/3.1.1/node_modules/mailgun-js/lib/request.js:331:19)
at IncomingMessage.emit (events.js:215:7)
at IncomingMessage.EventEmitter.emit (domain.js:476:20)
at endReadableNT (_stream_readable.js:1183:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Error: Too Many Recipients
at IncomingMessage.<anonymous> (/var/www/ghost/versions/3.1.1/node_modules/mailgun-js/lib/request.js:327:17)
at IncomingMessage.emit (events.js:215:7)
at IncomingMessage.EventEmitter.emit (domain.js:476:20)
at endReadableNT (_stream_readable.js:1183:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Have you gotten to the bottom of this? Running into a similar situation with my Node.js setup.
The problem was with mailgun. Their automated system accidentally marked my account as suspicious, imposing some limit on the number of emails that can be sent from the account.
I created a support ticket and the issue was resolved after their verification.
This was the reply from Mailgun
After further review, your account was automatically placed on an evaluation period [1], which limits the account in various ways such as this. To help protect our customers against spam, we have automated systems in place to flag accounts that appear suspicious. On most occasions, this process works very well; however, sometimes we get it wrong and flag a genuine account. There are a number of factors that contribute to the flagging of the account for business verification, but they are not necessarily directly related to you.
Run into a similar problem I think, will check back after hearing from MG support.
Ran into the same problem, we are waiting for the Mailgun support for a week now.
I know that using Mailgun for such an application is the right thing to do, bu damn this has taken too long.
Hi, Ran into the same problem. Apparently, mailgun restricted the number of bulk emails to 10 in one go. And the overall cap of 100 in one hour.
Since they don’t plan to increase this limit for new users, can we have a feature to select the number of members we want to send the newsletter to? Or maybe define a batch size, like send the newsletter in batches of 5.
Ran into the same problem as @Aditya-Chowdhry with a brand new digital ocean one-click ghost installation, and a brand new mailgun eu account. I have 119 members, all of which signed up and double opted in etc over the course of last month.
Last month when I sent the very first newsletter email, everything worked, this month while trying to send the second one I got Error: Too Many Recipients
as well. The only thing that changed since last month is that I got the 101th member.
So assuming this must be mailgun rate-limiting my account, I contacted Mailgun support today to ask to get the limits lifted, and they said :
After reviewing the account in detail, we have determined that the probation will remain in effect for now. In the meantime, we ask that you please focus on implementing our email best practices as well as establishing a larger sending history for us to evaluate. To assist with lifting probation in the short-term future, we recommend referencing our documentation regarding email delivery [1], inboxing [2], deliverability best practices [3], sending best practices [4] and our Acceptable Use Policy [5].
I use Ghost, out-of-the box, for my app’s news blog. It’s where I post about the new features I ship once a month or so, and it’s only to signed in users who double opt in etc, and the app isn’t related to any topics they have in their offensive content etc list – so I highly doubt this is about mailgun’s acceptable use policy.
as well as establishing a larger sending history for us to evaluate
As far as I know we can’t send newsletters slowly with Ghost, so I’m not sure whether if I can do this in the first place. Given the way Ghost’s newsletters work, I think I’m stuck. – and if I can’t send slowly, it sounds like Mailgun won’t lift the limits.
@Kevin is there any way we can configure Ghost to send out newsletters slower? If not – If you can point me to the right direction, I actually wouldn’t mind working on a pull request to give it a shot.
[edit : @Kevin – I just found in GitHub / mailgun.js that there’s a BATCH_SIZE and looks like it’s exported / exposed and used in : bulkEmailService.BATCH_SIZE
in mega.js.
Is there any way I can configure this easily somehow? Either via the GUI or with a JSON config file etc. This would solve all my problems (and likely many others’ problems getting started with mailgun with a batch smaller than 100)
For my app (and not the Ghost blog) I use Postmark for transactional emails, and have sent large-scale (10,000+ recipients) broadcast emails (things like privacy policy changes etc) without any issues with them in the past, even right after signing up and getting verified. – I think having a secondary bulk-email integration could help the community immensely, and if you don’t mind pointing me to the right direction, I can also gladly make a pull request for a Postmark integration as well.
Many thanks for the help
Best,
C
Small update –
Sent one more email to Mailgun support after posting here, this time emphasizing that I have an out-of-the-box fresh Ghost installation, that I don’t have an easy way to control the batch size, and can’t establish a larger sending history for them to evaluate if I can’t send anything in the first place.
A few hours later they responded with this :
After reviewing the account in detail, we have removed the probation, and now the account is fully enabled. This means that your emails will no longer be restricted to 100 per hour. The probationary status originated from our reputation monitoring system flagging various factors on the account. We reviewed these factors and cleared them from the system for your account.
– Moral of the story is, if mailgun support says no, don’t give up just yet, email again and clarify the situation. I tried sending the newsletter again, and now it worked.
I’m not sure what the best solution is here, but just wanted to let you & team know @Kevin that mailgun definitely lowered their cap to 100/hr and not being able to adjust the batch size (or having a batch size of 1000) is causing problems with mailgun nowadays, especially if you’re starting up with a fresh ghost setup & mailgun account.
Best,
C
Funny, that I tried again talking to Mailgun support to increase the quota of batch size and in turn, they suspended my account without giving any reason or so.
Now I am stuck and looking out to integrate some other mail provider.
We’re encountering this error with 19 subscribers. Apparently the new account limit is now 10. The advice for improving your Mailgun reputation is “send more emails” (per response from Mailgun support). But if you’re only sending emails to 19 people (in batches of 10 or less) how on earth would that help your reputation?
NB if we manually modify mailgun.js BATCH_SIZE will it change how many emails are sent to Mailgun in one go?
How can i contact mailgun?
Today if the default Mailgun batch size is defined to 1000 in the mailgun library.
If you manually replace the code in mailgun-client.js
static BATCH_SIZE = 1000;
With :
static BATCH_SIZE = 10;
Ghost will chunk the members list by 10 and not by 1000.
Mailgun will accept to sending emails if your account is limited to 10 recipients for validation like my account.
Caution : This only works for new posts !
The batches are saved into the database, if you change this value you have to clean the previous batches created.
This value could be configurable to fix this king of limitation :
This solutions worked few weeks ago. Mailgun seems to have reduce the max BATCH SIZE under 10…
I opened my Mailgun account in 2015 and used it for the odd email. When I tried to use it yesterday to send a newsletter to 29 subscribers, it showed as sent in Ghost, but much later gave an error.
After lots of troubleshooting and googling, I eventually saw a post that mentioned the possibility of Mailgun limiting my account.
I opened a ticket, and they sent me a mail asking a whole bunch of questions about my website, number of subscribers, terms and conditions etc.
I asked them to tell me what I did wrong and why they didn’t notify me. After a couple more emails, they claimed that my account was always limited. I asked them why I wasn’t notified, but I haven’t received an answer yet that makes sense.
I informed them in my last mail that I refuse to answer all of their questions until they answer mine. I directed them to my website to show them that I’m a legitimate writer and not an email spammer than they made me out to be.
Needless to say, I’m not going to be using Mailgun since I’m not fond of companies that treat new users like spammers without notification. That, coupled with their robot-like emails, gives me the feeling that they won’t be much help when things go wrong again.