Deliverability

Mailgun 421 "Free accounts are for test purposes only": fix

The error means your Mailgun account is on the free plan, which only sends from the sandbox domain to authorized recipients. Either authorize the recipient for testing, or move to a paid plan and verify your own domain. If price is the issue, another sending provider is the other way out.

Sohail HussainSohail Hussain9 min read

Short answer

  • The 421 means Mailgun treated your send as sandbox or restricted Free-plan traffic, which only reaches up to 5 authorized recipients.
  • To test, add the recipient under the sandbox domain's authorized recipients. For real sending, send from your own verified custom domain and use its sending credentials, not the sandbox ones.
  • If the dashboard will not let you add a domain or the error persists on a verified domain, ask Mailgun support to review the account.

Mailgun is rejecting your mail with this:

421 Domain is not allowed to send: Free accounts are for test purposes only. Please upgrade or add the address to your authorized recipients.

Most reports come from people running a new app or a Ghost newsletter against a fresh Mailgun account. It is a policy refusal, so retrying the same message will not change the result.

Why Mailgun returns this error

A 421 normally means a temporary "service not available" condition. Mailgun uses it here for an account rule. The rule is documented: on the Free plan without credit card information present, or on the sandbox domain, you can only send to Authorized Recipients. Mailgun's stated reason is that restricting a domain or account to a fixed set of verified addresses makes it less useful for spammers.

The causes, most common first:

  1. Your app still uses the sandbox domain. The sandbox domain is the long one starting with sandbox. Mailgun says authorized recipients only exist and function within the context of the sandbox domain. Any other recipient is refused.
  2. The Free account has no custom domain yet, or the app uses the sandbox API credentials or SMTP login even though a custom domain exists.
  3. The account is Free with no credit card on file. Mailgun's wording ties the restriction to that state. Whether adding a card or moving to a paid plan is the exact trigger can change, so confirm in your billing page or with support.
  4. The custom domain is unverified or disabled. I can't say from the evidence whether this produces this exact 421 or a different error. Check it anyway.

One correction to what many older posts say: Mailgun's current Free plan page lists 100 messages per day and 1 custom domain you can add, verify and send from. So a custom domain is not always a paid-only feature. Community reports of support telling users to upgrade to $15/month are real, but plans change; check what your own dashboard offers.

Step-by-step fixes

Fix 1: authorize recipients (testing only)

  1. In the Mailgun Control Panel, pick the sandbox domain in the Domain dropdown near the top right.
  2. Open the Setup tab of the domain settings.
  3. Enter the test address and click Add. You can add up to 5 authorized recipients.
  4. Open the activation email at that address and click the link. Until then the recipient is "Unverified"; after it, "Verified" and you can send.
  5. Send again.

This is fine for checking that your integration works. It cannot carry a real mailing list.

Fix 2: send from your own verified domain

Mailgun's guidance is that regular production sending needs a domain you acquire through a DNS provider and set up with Mailgun.

  1. In the Control Panel, open Sending > Domains and add your domain. A subdomain such as mg.example.com keeps this traffic apart from your main mail. The name cannot be renamed later.
  2. Publish the DNS records Mailgun shows you, at least SPF and DKIM. Copy Mailgun's exact values. Mailgun's Cloudflare guide also advises that if the domain has other providers' MX records, it is almost always safest to use a different domain, ideally a subdomain, for Mailgun.
  3. Click verify and wait for DNS to propagate. This can take minutes to a day.
  4. In your app or Ghost config, replace the sandbox domain, API key or SMTP login with the ones for the new domain. Check that the region (US or EU) matches the account.
  5. Send to an address that was never authorized. If it arrives, you are past the sandbox.

An SPF record for the subdomain typically looks like this (Mailgun's dashboard values win if they differ):

mg.example.com.  TXT  "v=spf1 include:mailgun.org ~all"

Our SPF generator helps if you send from other services too, and how to set up SPF, DKIM and DMARC covers the rest.

Fix 3: you cannot add a domain

Mailgun documents the limits: Free accounts with no card that already added one domain will not see a button to add another, and are limited to the sandbox plus one other domain. Upgrading is required to add more. Also, a domain cannot be added if the account or another domain on it is disabled, or if your user role is neither Admin nor Developer.

Wrong credentials, same error

After you add a custom domain, the sandbox API key or SMTP login in your app still points at the sandbox. Update every place the credentials live, including environment variables and the CMS settings page.

Which cause matches your symptom

SymptomLikely causeFix
Works for your own address, fails for everyone elseSandbox with authorized recipientsFix 2
Sending domain starts with sandboxApp uses sandboxFix 2, step 4
No "add domain" buttonFree account already has one domainFix 3 or upgrade
Custom domain exists, still 421Old credentials, unverified domain or account flagCheck step 4, then support
Fails after about 100 messages in a dayFree plan daily capUpgrade or spread sends

If you use Ghost

Ghost sends newsletters through Mailgun, so a new site on a free Mailgun account hits this as soon as it emails members. People on Ghost's community forum report that the old pay-as-you-go "flex" route is gone, and that some got around it by starting a paid trial and downgrading. I have not verified that trick and would not build on it; Mailgun can close it at any time.

A related Ghost report is a "recipient limit exceeded" message even with fewer than 1,000 members. I can't confirm the cause. First check that Ghost uses a verified custom domain, not the sandbox, then send Mailgun support the exact text and a timestamp.

Cheaper ways out

If a monthly fee is more than your list justifies, you have these routes:

  • Stay on Free with one custom domain. At 100 messages per day this suits a very small list, and the cap applies per day, so a newsletter to a few hundred people will not fit.
  • Pay per send elsewhere. Amazon SES and similar relays bill by volume. The catch is more setup, and some CMSs do not support them for bulk mail without extra work.
  • Move only the newsletter. Export members as CSV, keep the consent record with the file, and import only people who opted in.

Check the numbers first

Mailgun's own docs show paid plans include a monthly message allowance, with overage billed per 1,000 emails. Compare your real monthly volume against the current pricing page before switching providers.

Checklist before you try again

  • The app sends from your custom domain, not the sandbox one.
  • The API key or SMTP login belongs to that domain.
  • DNS records are published and the domain shows as verified.
  • The region (US or EU) matches the account.
  • You have not passed 100 messages today if you are on Free.
  • You test with an address that was never authorized.

If nothing works

Contact Mailgun support through the dashboard (ticket support is included on Free). Include the exact error, a timestamp, the domain name, the message ID and what you tried.

Subject: 421 "Free accounts are for test purposes only" on a verified domain

Hello,
Sending from mg.example.com (verified, DNS records published) returns:
"421 Domain is not allowed to send: Free accounts are for test purposes only. Please upgrade or add the address to your authorized recipients."
Timestamp (UTC): {time}
Message ID: {id}
Plan shown in dashboard: {plan}
I confirmed the app uses this domain's credentials, not the sandbox's.
Please tell me what restriction applies to my account and how to lift it.

Where Mailneo fits

Mailneo does not fix this error, because it sends through accounts you connect, and Mailgun is one of the SMTP providers it supports, so Mailgun's rules still apply. If you want newsletters and cold outreach in one tool, the newsletter features start on the Professional plan at $29/month (as of November 2026), billed in USD, with a 3-day free trial. See email accounts for how connecting works. Mailneo is not a transactional API and has no native Ghost integration, so you would move your list by CSV.

Common questions

Is a 421 error temporary, so should I retry?

Normally yes, but not here. Mailgun is enforcing an account rule, and the message will keep failing until you change the domain, credentials or authorized recipients.

Can I authorize my whole subscriber list?

No. Mailgun allows up to 5 authorized recipients, and each has to click an activation link.

Does the free plan really allow a custom domain?

Mailgun's current Free plan page says one custom domain is included, with 100 messages per day. Support replies and older posts may say otherwise, so check your dashboard.

Will the paid-trial-then-downgrade workaround last?

I would not count on it. It is an unofficial report from users, not a documented path.

deliverabilitymailgunerror-codes
Share this article
Sohail Hussain

Sohail Hussain

Founder & CEO at Mailneo

Building Mailneo — AI-powered email marketing for growing businesses.

Related Articles

Deliverability

Apollo + Mailgun: "domain not on a Mailgun account" and IMAP

Apollo shows a "domain not being on a Mailgun account" error and asks for an IMAP host because Mailgun is a transactional sending service with no mailboxes. Verify the domain in Mailgun if you send by API; for sequences that need replies, connect a Gmail, Outlook or SMTP+IMAP mailbox instead.

Sohail Hussain|8 min read
Deliverability

Connection refused #111 on SMTP port 587: how to fix it

Connection refused #111 on port 587 means your server's TCP connection never reached the SMTP host, so a firewall, security group or hosting policy is blocking outbound traffic. Test the port with openssl s_client, open egress, switch to port 2525 or 465, or send through the provider's HTTP API instead.

Sohail Hussain|10 min read
Deliverability

DMARC Fails When SPF and DKIM Pass: Fix Alignment (550 5.7.23)

DMARC needs SPF or DKIM to pass and the passing domain to match your visible From domain. When both pass for a different domain (a vendor's bounce domain, a Mailgun subdomain), DMARC still fails. Sign DKIM with your From domain; one aligned DKIM signature is enough.

Sohail Hussain|9 min read
Deliverability

EmailError ETIMEDOUT in Ghost: Mailgun SMTP Timeout Fix

Ghost's "EmailError ETIMEDOUT ... Connection timeout" means your server could not open a TCP connection to the SMTP host in time. Newsletters go through the Mailgun API over HTTPS, so they still work. Test port 587 from the server, then open it, switch to port 2525, or fix DNS.

Sohail Hussain|9 min read

Ready to supercharge your email marketing?

Start sending smarter emails with AI-powered campaigns. No credit card required.

Get Started Free