Too many recipients error while sending email newsletter using Mailgun

Hi, I get this error whenever I try to send newsletter. Can anybody please help me to fix this?
Capture

1 Like

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.

1 Like

Run into a similar problem I think, will check back after hearing from MG support.

2 Likes

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.

2 Likes

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.

1 Like

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. :sweat_smile:

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 : @KevinI 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 :v:t2:

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. :man_shrugging:

Now I am stuck and looking out to integrate some other mail provider.