Skip to content

Mailgun Rate Limiter [possibly] hit #11023

Open

Description

@mountainash

👟 Reproduction steps

After you've previously setup Mailgun as a Messaging Provider;

  1. Go to AW Cloud
  2. Click on Messaging
  3. Create an email to many (30+) email targets/recipients
  4. Send the email now (or at another time)

Appwrite (AW) will show that the email has been sent to all recipients, while Mailgun (MG) logs will show that only 20-25 requests to send an email were logged.

Originally raised at https://discord.com/channels/564160730845151244/1406618445491212389 and refined in https://discord.com/channels/564160730845151244/1406618445491212389/1454088484900966533 & https://discord.com/channels/564160730845151244/1406618445491212389/1454282386282905743

It would appear that either AW isn't sending all the requests [individually] to send an email, or Mailgun is dropping them (maybe some type of API rate limiting).
Is their logging on the AW Cloud side to show when the requests to Mailgun fail? Is AW using the best API to batch send an email with multiple recipients to Mailgun? (it would appear to me that AW is looping the API calls/hammering the Mailgun endpoint servers).

👍 Expected behavior

  • email request passed to MG in one API call
  • request status shown in AW UI

When MG is setup in the AW web UI with an API key, I'd expect that the API is being used (not SMTP), as such the API allows for an array of recipients to be specified.

Possible pointers for Contributors

From a quick search of the codebase, it would seem that changes would need to be made in these to files to be able to handle recipients as an array when using a service provider (not SMTP).

Information about MG rate limiting responses: https://discord.com/channels/564160730845151244/1406618445491212389/1454295163525529651

🎲 Appwrite version

Version 1.8.x

🧱 Your Environment

  • Mailgun

Activity

  1. added theissue type on Dec 27, 2025
  2. added
    product / databases
    product / messaging
    product / sites
    product / storage
    on Dec 27, 2025
  3. coderabbitai commented on Dec 27, 2025

    @coderabbitai
    Contributor

    📝 CodeRabbit Plan Mode

    Generate an implementation plan and prompts that you can use with your favorite coding agent.

    • Create Plan
    Examples

    🔗 Similar Issues

    Related Issues

    👤 Suggested Assignees

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  4. added 3 commits that reference this issue on Dec 30, 2025
    ce3d61c
    4bd6e24
    491ca80
  5. ooye-sanket commented on Dec 30, 2025

    @ooye-sanket

    Hi team!
    Just opened a PR to fix issue #11023 (Mailgun rate limiting when sending to 30+ recipients): #11042 The fix implements batch sending using BCC, reducing 30+ API calls to just 1 call while maintaining full backward compatibility.

    @mountainash - This should solve your issue! @sesam @brandonroberts @tomer @SoftCreatR - Would love a review when possible

    Thanks!

  6. mountainash commented on Dec 30, 2025

    @mountainash
    Author

    Great work @ooye-sanket. I think the is will also solve a #10474 as well?

  7. ooye-sanket commented on Dec 30, 2025

    @ooye-sanket

    yes! this PR Partially Solves This Issue Too!

  8. mountainash commented on Jan 15, 2026

    @mountainash
    Author

    It's a bit disheartening to see that @ooye-sanket jumped on this pretty quickly and coded up a thoughtful backwards compatible fix, to have it just get stale with no response at all.

    Just letting you know @ooye-sanket that I apricate what you've done and hope that this can be merged (or responded to) by the Maintainers soon.

  9. ooye-sanket commented on Jan 16, 2026

    @ooye-sanket

    Thanks a lot @mountainash really appreciate your kind words and support

  10. removed
    product / storage
    product / databases
    product / sites
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    product / messaging

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions