Skip to main content
12 min readMessaging & AI

Setting Up Mailgun

Connect Mailgun as your email provider, verify the right domain and region, configure probation-safe throttling, and understand where Mailgun fits best for agency-managed email.

Mailgun is an email delivery service built with developers in mind, but agencies do not need to be technical to use it successfully. It is known for strong deliverability, detailed analytics, and the kind of control that becomes attractive once you care about domain-level email operations seriously.

For agencies that want deeper control over sending domains, webhook verification, and account-region setup, Mailgun is a strong option. The trade-off is that it is a little more involved than SendGrid or Brevo and does not offer a permanent free tier.

What Mailgun is and when it makes sense

Mailgun is a good fit for agencies that want a more infrastructure-like provider without losing the benefits of an API-based setup. It is especially useful when you want strong domain separation, more granular delivery control, or you already use Mailgun elsewhere.

PlanMonthly volumeCost
Trial100 emails per hour during probationFree first month
Foundation50,000 per monthFrom $35 per month
Scale100,000 per monthFrom $90 per month
CustomMillions per monthContact sales
Worth knowing

New Mailgun accounts start in a probation period with a hard sending limit. That is normal and should shape your initial throttling settings.

Before you start

  • A Mailgun account
  • A sending domain or subdomain such as mail.youragency.com
  • Access to the DNS settings for that domain
  • Clarity on whether your Mailgun account is in the US or EU region

Part 1: add and verify your domain in Mailgun

Inside Mailgun go to `Sending -> Domains`, click `Add New Domain`, enter the sending domain, and choose the correct region for the account.

Mailgun will then give you the DNS records needed to verify the domain. In most cases that includes SPF and DKIM records, and optionally MX and tracking records depending on how fully you want the domain configured.

  • A subdomain is usually better than the root domain because it protects the main domain reputation
  • Make sure the region you choose matches the actual Mailgun account region
  • Return to Mailgun and verify the DNS settings after adding the records

Part 2: get your API key and signing secret

Mailgun requires two values for a proper setup: the private API key and the webhook signing secret.

Go to `Settings -> API Security` and copy the Private API key, then copy the webhook signing key from the same area.

  • Use the Private API key, not the public validation key
  • Keep both values safe before moving into the platform setup

Part 3: connect Mailgun in the platform

Go to `Platform -> Messaging -> Email`, click `Add Provider`, name the provider, expand `Other Providers`, choose `Mailgun`, and continue through the setup wizard.

FieldWhat to enter
API KeyYour Mailgun Private API key
DomainThe exact verified sending domain, with no protocol
Base URLapi.mailgun.net for US or api.eu.mailgun.net for EU
Worth knowing

The most common setup failure is a region mismatch. If the domain is in the EU region but the US base URL is selected, verification will fail even if the key itself is correct.

Part 4: set throttling that matches Mailgun probation

Mailgun puts new accounts into probation with a limit of 100 emails per hour. The safest starting point is to match that limit rather than fight it.

A sensible probation-safe throttle is 1 email every 36 seconds. Once Mailgun lifts probation, come back and increase the sending speed.

  • Probation usually lasts a few days to a couple of weeks
  • Send to real recipients who expect the messages
  • Do not try to push large lists through a brand-new account in probation

Part 5: configure feedback webhooks

Mailgun is a little different from SendGrid and Brevo because the signing secret is generated on their side, not by the platform. That is why you need to paste the signing secret during setup.

Once that is in place, the platform can register the important webhook events and verify that incoming feedback genuinely came from Mailgun.

  • Permanent failures help catch hard bounces
  • Complaints help catch spam reports quickly
  • Mailgun does not force open and click tracking on by default, which is often better for deliverability

Part 6: set sender details and test

  • Use a from address on the verified Mailgun domain
  • Set a clear from name and reply-to address
  • Review the region, domain, and throttling summary before sending the test email
  • Send a test email before treating the provider as live

After probation, update your throttling

Once Mailgun lifts probation, edit the provider and increase the throttling. If you forget, campaigns still work, but they will send far more slowly than they need to.

  • A sensible post-probation starting point for many agencies is 50 emails every 1 second
  • Adjust based on actual list quality, reputation, and campaign volume

How Mailgun interacts with custom-plan credits

Mailgun changes the delivery provider. It does not change the agency custom-plan credit logic for review request invites in a normal agency-managed sending setup.

So if a Mailgun-powered invite fails because of credits, the likely issue is still the customer plan email limit rather than the Mailgun connection itself.

  • Transactional emails remain separate from invite credits
  • Normal agency-managed invite emails still respect the customer plan email limit
  • The main exception remains customer-owned Gmail or Outlook sending from inside the customer account

Common questions