Migration guideMailgun to Sendcorex

Migrate from Mailgun. Keep your deliverability.

A step-by-step plan for moving off Mailgun — replacing the domain-scoped API call, publishing new DNS records, and the parallel-sending window that keeps your sender reputation intact.

No credit card required · Migration usually takes 1–2 weeks end to end

Code changes

Minutes

Swap the domain-scoped Mailgun call for one JSON request

DNS propagation

24–48h

SPF, DKIM and DMARC records need time to settle

Full migration

1–2 wks

Includes the parallel-sending warm-up window

Typical timeline for a mid-size sender. Larger lists or dedicated IP warm-up can take longer.

The migration

Six steps, in order

Get started free
  1. 1

    Create your Sendcorex account and API key

    Sign up free and generate an API key from the dashboard. Keep your Mailgun account active — you'll run both in parallel for a few weeks, not cut over instantly. Before you start, list every sender: apps calling the Mailgun API, SMTP relays, and any Routes that handle inbound mail. Export your bounces, unsubscribes and complaints from Mailgun's suppression lists so you can load them into Sendcorex before the first real send.

  2. 2

    Add and verify your sending domain

    Add your domain in Sendcorex, then publish the SPF, DKIM and DMARC records it gives you as new DNS entries. Leave Mailgun's DKIM record, tracking CNAME and any MX records in place, and merge Sendcorex's SPF include into your existing SPF record rather than adding a second one.

  3. 3

    Wait for DNS to propagate, then verify

    Give it 24–48 hours. Check verification status in the Sendcorex dashboard before sending anything — sending through unverified DNS is what causes the deliverability problems people blame on migrations.

  4. 4

    Update your code — endpoint and key only

    Mailgun's API is scoped to a domain and takes form-encoded fields with basic auth (api:YOUR_KEY). Sendcorex takes a JSON body with a Bearer token, so change the URL and auth header and send from, to, subject and html as JSON. If you send over SMTP, change the host from smtp.mailgun.org to smtp.sendcorex.com and use your new API key as both username and password.

  5. 5

    Shift volume gradually, not all at once

    Start with 10–20% of sends routed through Sendcorex, watch delivery and bounce rates in real time, then increase over 1–2 weeks. This lets Sendcorex's IPs warm up against mailbox providers instead of arriving as an unknown sender all at once. Move one sending domain or one type of mail at a time if you can, rather than everything at once.

  6. 6

    Cut over fully, then retire Mailgun's DNS records

    Once 100% of volume runs cleanly through Sendcorex for a few days, remove Mailgun's SPF include, DKIM record and tracking CNAME, then delete the domain and cancel. Download any event logs you need first — Mailgun only keeps them for a limited time.

Step 4 in practice

The code change, side by side

Before — Mailgun (mailgun.js)
import formData from 'form-data';
import Mailgun from 'mailgun.js';
const mg = new Mailgun(formData).client({ username: 'api', key: 'MAILGUN_API_KEY' });
await mg.messages.create('yourdomain.com', {
  from: 'hello@yourdomain.com',
  to: ['customer@example.com'],
  subject: 'Welcome!',
  html: '<h1>You are in.</h1>',
});
After — Sendcorex (plain REST, no SDK)
send.js
const response = await fetch('https://mail.sendcorex.com/v3.0/send', {
  method: 'POST',
  headers: {
    'Authorization': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    to: 'customer@example.com',
    from: 'hello@yourdomain.com',
    senderName: 'Your Company',
    subject: 'Welcome!',
    body: '<h1>You are in.</h1>',
  }),
});
Before you cut over

Pre-flight checklist

  • SPF is a single record that includes both Sendcorex and Mailgun for now

  • DKIM selector for Sendcorex shows as verified in the dashboard

  • Test send delivered to Gmail, Outlook, and Yahoo test inboxes without landing in spam

  • Bounces, unsubscribes and complaints exported from Mailgun and loaded into Sendcorex

  • Mailgun webhook URLs replaced with a handler for Sendcorex delivery and bounce events

  • Bounce and complaint rate monitored daily during the ramp-up window

Before you switch

Common questions

Steps and timelines reflect typical migrations as of 2026 and may vary based on list size, DNS provider, and existing authentication setup.

Not if you run a parallel sending window instead of an instant cutover. Sender reputation lives on the sending domain and IP, so warming up Sendcorex's IPs for 1–2 weeks while gradually shifting volume avoids a deliverability dip. If you had a dedicated IP on Mailgun, that IP's reputation stays behind — your domain's reputation moves with you, which is why the ramp matters.

Ready to move off Mailgun?

Create your account, verify your domain, and start the parallel-sending window today.

Get started free

No credit card required