Migrating from Mailgun to Mailofly
Mailgun has been a legacy email provider for over a decade, but modern teams often find itsmultipart/form-data API design awkward, its domain-scoped URL paths clunky (/v3/DOMAIN_NAME/messages), and its billing tiers unpredictable.
Mailofly simplifies email sending with clean REST JSON endpoints, typed modern SDKs, predictable pricing, and instant real-time logs.
Key Differences at a Glance
1. Code Comparison
Node.js / TypeScript
Python
cURL
2. Migrating Suppressions (Bounces & Complaints)
Mailgun tracks three suppression lists:- Bounces:
/v3/{domain}/bounces - Unsubscribes:
/v3/{domain}/unsubscribes - Complaints:
/v3/{domain}/complaints
Export from Mailgun
- Log in to the Mailgun control panel.
- Go to Sending → Suppressions.
- Select your domain and download the CSVs for Bounces, Unsubscribes, and Complaints.
Import into Mailofly
- In Mailofly, navigate to Audiences > Contacts.
- Click Import CSV.
- Select your suppression files and check Mark as Suppressed / Unsubscribed.
- Mailofly will ensure no further emails are dispatched to these addresses.
3. Webhook Migration
Mailgun requires calculating an HMAC-SHA256 digest ontimestamp + token using your Mailgun signing key. Mailofly uses standard Svix / HMAC webhooks.
Event Name Mapping
Migration Checklist
- Add domain to Mailofly and configure DKIM (
mailofly._domainkey) and SPF. - Add
include:mailofly.comto your domain SPF record. - Export Mailgun Bounces, Complaints, and Unsubscribes, and import into Mailofly.
- Update client application code from
multipart/form-datato@mailofly/nodeJSON calls. - Configure Mailofly webhook URLs for delivery and bounce tracking.
- Verify test emails on the Mailofly dashboard.
- Remove Mailgun MX and SPF records after the transition is complete.

