🥳 Celebrate Our Launch With a $200 LIFETIME Discount OFF The Premium Plan Use: BIRTHDAY2024

This offer expires 9/30/2024, at 11:59 PM EST

BizStackPro all-in-one digital marketing platform dashboard.
Mailgun Error Codes Library – BizStackPro Help

Mailgun Error Codes Library

Use this library to troubleshoot Mailgun errors. Each code includes what it means and the fastest next steps to get your sending back on track.

Fixing Email Errors Faster So Your Sending Doesn’t Stop

You may run into Mailgun errors while sending emails, and without clear guidance, troubleshooting can slow everything down.

Each error code points to a specific issue—like missing parameters, domain problems, or sending limits.

Without understanding what the error means, it’s easy to guess and waste time fixing the wrong thing.

This guide will help you quickly identify common Mailgun errors and apply the correct fix so your sending stays consistent.

Once you understand how these error codes work, use the sections below to match your error and apply the recommended fix inside your Mailgun setup.

How to Use This Library

When Mailgun returns an error, match the code below and apply the recommended fix. Most issues resolve quickly by checking parameters, domain status, DNS verification, and account limits.

Follow along: Start with 400-series issues (request/config problems), then check rate limits (429), and finally server errors (500).

400 Errors (Bad Request)

A 400 error usually means something in the request is missing, invalid, or incorrectly formatted.

  • from parameter is missing: Add a valid sender address in from.
  • to parameter is missing: Add a valid recipient address in to.
  • message parameter is missing: Provide an email body (or required message parameter).
  • Need at least one of ‘text’ or ‘html’: Include a plain text or HTML body.
  • Only one of ‘html’ or ‘template’ allowed: Use either HTML content or a template—not both.
  • Too many recipients (max 1000): Reduce recipients to 1000 or fewer.
  • Invalid address: Fix formatting for to, from, cc, or bcc.
  • Invalid request type: Use the required content type (often multipart/form-data).
  • Malformed multipart/form-data: Correct formatting issues in the payload or file uploads.
  • Invalid delivery time: Use valid date/time formatting when scheduling.
  • Sandbox domain limitation: Use a verified sending domain for production.
  • Free account limitation: Upgrade if your plan limits production sending.
  • Unverified domain: Verify DNS settings in Mailgun before sending.
  • Inactive account: Complete activation/verification steps in Mailgun.

Quick check: If you only have 30 seconds, verify from, to, and that your domain is verified.

401 Error (Forbidden / Unauthorized)

A 401 generally points to authentication or permission issues.

  • Confirm you’re using the correct API key (and that it hasn’t been rotated).
  • Check the account role/permissions for the user making the request.
  • Verify the request is being made against the correct region/endpoint for your Mailgun account, if applicable.

403 Errors (Restricted Action)

A 403 means the request is understood, but the action is blocked due to restrictions or policy.

  • Large batch not allowed: Reduce batch size or request permission for higher volume.
  • Rejected IP / unauthorized sending: Use an authorized sending IP or confirm domain/account restrictions.

404 Error (Domain Not Found)

This error usually means the domain you’re using doesn’t exist in your Mailgun account.

  • Confirm the domain is added under Domains in Mailgun.
  • Verify DNS records and domain status (especially if it was recently added).
  • Check for typos in your domain string in the request.

413 Error (Request Too Large)

The request payload exceeded the maximum allowed size (often due to attachments).

  • Reduce attachment size or number of files.
  • Compress images/documents where possible.
  • Send file links instead of large attachments when appropriate.

429 Errors (Rate Limits)

Rate limits can be triggered by request volume, total bytes, or recipients over a given time window.

  • Request limit exceeded: Wait until the reset time, then retry.
  • Bytes limit exceeded: Reduce payload size or frequency, then retry after reset.
  • Recipient limit exceeded: Reduce recipients per send and use drip/batching.

Best practice: If you routinely hit 429 limits, slow down sending or split campaigns into smaller batches.

500 Error (Internal Server Error)

A 500 error indicates a server-side issue at Mailgun.

  • Retry after a short delay.
  • If it persists, check Mailgun service status and contact support with request details.
  • Log the full error response to help identify patterns.

Want fewer sending errors and smoother campaigns?

BizStackPro helps you manage contacts, campaigns, and automation—so you can troubleshoot faster and keep outreach consistent.

Frequently Asked Questions

What does Mailgun error 400 mean?

It’s a bad request—usually missing parameters, invalid addresses, or a malformed payload.

What does Mailgun error 401 mean?

Unauthorized/forbidden. Check your API key, credentials, and permissions.

What does Mailgun error 403 mean?

A restricted action—often batch/IP/domain limitations. Reduce volume or confirm authorized sending settings.

What does Mailgun error 404 mean?

Domain not found in Mailgun. Confirm the domain is added and DNS/verification is correct.

What does Mailgun error 413 mean?

Request too large (often attachments). Reduce message size and try again.

What does Mailgun error 429 mean?

Rate limit exceeded. Wait until reset, then retry with lower volume or smaller batches.

What does Mailgun error 500 mean?

Internal server error at Mailgun. Retry later; contact support if it continues.

Troubleshoot Mailgun Faster and Keep Email Running

Most Mailgun errors are quick fixes: verify parameters, confirm domain/DNS status, and respect sending limits. Use this library as your go-to reference when something breaks.

✅ View Plans & Features

Faster fixes. Fewer interruptions.

Disclaimer: This site is NOT endorsed by Google, Facebook or YouTube in ANY WAY. All trademarks & Logo / branding are the property of their respective owners. Please Note: This site was created in BizStackPro by Ken George II (An Affiliate of BizStackPro) and may contain affiliate links.

All About BizStackpro


Copyrights 2024 | AllAboutBizStackPro.Com | Pricing | About | Features | All Rights Reserved.