If you need to send a lot of emails—like newsletters, updates, or notifications—Mailgun can do the heavy lifting. But there’s a catch: blasting out emails is the easy part. Getting them into inboxes (not spam folders) is where most folks trip up. This guide is for anyone who needs to send bulk emails with Mailgun and actually wants their emails to get read. I’ll walk you through real steps that work, what to avoid, and the unglamorous details that matter most.
1. Get Your Sending Domain and Account in Order
Before you even think about sending, get your basics right. Spam filters watch for sloppy senders. Here’s what you need to do:
- Use a custom domain. Don’t send bulk emails from a generic Gmail, Outlook, or the free sandbox domain Mailgun gives you. Set up a dedicated domain or subdomain for your email campaigns.
- Verify your domain in Mailgun. Set up DNS records (SPF, DKIM, and preferably DMARC). If you skip this, your emails will almost definitely be flagged as spam or rejected outright.
- Warm up your domain. If the domain is new, don’t send thousands of emails on day one. Start small (a few dozen to a couple hundred), increase volume gradually over a couple weeks, and monitor bounce/spam reports.
Pro tip: If you’ve inherited a domain with a bad reputation, consider starting fresh. Fixing a burned domain is slow and sometimes not worth it.
2. Clean Your Email List—Seriously
It’s tempting to use every email you’ve ever collected. Don’t. Dirty lists (with old, fake, or typo-filled addresses) are spam filter magnets.
- Remove invalid and unengaged addresses. Use Mailgun’s email validation API or a third-party tool before uploading your list.
- Never buy email lists. They’re full of traps and spam complaints. You’ll tank your sender reputation and might even get banned.
- Respect unsubscribes. Always honor opt-outs immediately. Failing to do this is a shortcut to the spam folder.
What works: Regularly cleaning your list, even if it means cutting out a big chunk. Fewer, more engaged recipients are better than a bloated list nobody reads.
3. Write Emails That Don’t Scream “Spam”
Spam filters are smarter than ever, but so are readers. Here’s what actually matters:
- Avoid spammy words and formatting. Don’t go wild with ALL CAPS, “FREE!!!”, or huge red fonts. Sound like a person, not a hype machine.
- Personalize where you can. Use the recipient’s name, reference things they care about. Mailgun supports variables and templates—use them.
- Keep it simple. A clean, well-formatted email with a clear subject and a real reply-to address is your best friend.
- Include a plain text version. HTML-only emails can look suspicious. Mailgun lets you send both HTML and plain text in one go.
Ignore: Anyone promising a magic subject line that “guarantees” deliverability. There’s no such thing.
4. Set Up Scheduling and Sending in Mailgun
Now for the nuts and bolts. Mailgun gives you a few ways to schedule and send in bulk:
Option A: Using the API
Mailgun’s API is the most flexible way to send and schedule emails.
Scheduling with the API:
- Use the o:deliverytime
parameter to schedule email delivery.
- Format: RFC2822 date (e.g., Mon, 05 Jun 2024 19:00:00 +0000
).
- Example curl command:
bash curl -s --user 'api:YOUR_API_KEY' \ https://api.mailgun.net/v3/YOUR_DOMAIN/messages \ -F from='you@yourdomain.com' \ -F to='recipient1@example.com,recipient2@example.com' \ -F subject='Your Subject' \ -F text='Hello, this is your message.' \ -F o:deliverytime='Mon, 05 Jun 2024 19:00:00 +0000'
Sending in bulk:
- You can list multiple recipients in the to
field, but better practice is to use batch sending with recipient variables for personalization.
- For large lists, use Mailgun’s batch sending (up to 1,000 recipients per batch), or loop through your list and send in smaller batches with delays.
Avoid: Sending thousands at once. Instead, pace your sends—think hundreds per minute, not thousands.
Option B: Using Mailgun’s Dashboard
If you’re less technical, you can upload a list and send through the dashboard, but options are limited for true personalization and scheduling. The API is more robust and scalable.
5. Monitor, Test, and Iterate
Don’t “set it and forget it.” Deliverability is a moving target.
- Send test emails first. Mailgun lets you send to just yourself or a test group. Check if it lands in spam or looks weird.
- Monitor bounces, complaints, and opens. Mailgun’s dashboard shows this data. High bounce or spam complaint rates = slow down and fix your list/content.
- Seed list testing. Send to accounts on Gmail, Outlook, Yahoo, etc., to see where your emails actually land.
- Authenticate and monitor DMARC reports. This isn’t glamorous, but DMARC reports show if someone’s spoofing you, or if your authentication is broken.
What works: Iterating based on real feedback. If you see a spike in bounces or spam complaints, stop and address the problem before sending more.
6. Common Traps and What to Ignore
Most “email deliverability hacks” are noise. Here’s what you can skip:
- Over-optimizing subject lines. A clever subject won’t save a bad list or a misconfigured domain.
- Buying deliverability tools that promise instant results. If it sounds too good to be true, it is.
- Embedding tons of images or attachments. These are red flags for spam filters. Stick to mostly text, with small images if needed.
- Ignoring feedback loops. If people mark your email as spam, ISPs will notice. Pay attention to complaints and adjust.
7. Quick Checklist Before You Hit Send
- [ ] Domain is authenticated (SPF, DKIM, DMARC)
- [ ] List is clean, opted-in, and recently validated
- [ ] Unsubscribes are handled
- [ ] Email content is personalized and not spammy
- [ ] Both HTML and plain text versions included
- [ ] Test emails sent and checked
- [ ] Sending volume is reasonable (not a sudden spike)
- [ ] Scheduled delivery times set (if needed)
- [ ] Monitoring set up for bounces and complaints
Wrapping Up
Bulk email isn’t rocket science, but it’s not “set it and forget it” either. Most deliverability problems come from dirty lists or skipping the basics. Take it slow, keep things simple, and tweak as you go. You’ll get better results with a smaller, engaged audience than a massive list that treats your emails like junk. Stay skeptical of anyone selling shortcuts, and focus on the fundamentals. Your inbox placement—and your readers—will thank you.