Moving from Mailgun

send.email has a drop-in replacement API for Mailgun. You can use it without changing your existing code.

  1. Add your domain

    Sign up, add your sending domain and set its SPF, DKIM and DMARC records.

    TXT    mail.example.com                  v=spf1 include:spf.send.email ~all
    CNAME  se1._domainkey.mail.example.com   se1.k7d2qx.dkim.send.email
    CNAME  se2._domainkey.mail.example.com   se2.k7d2qx.dkim.send.email
  2. Point your Mailgun library at mg.send.email

    Use a send.email API key in place of your Mailgun key. SMTP works too, at smtp.send.email on ports 587, 465 and 2525.

    const mg = mailgun.client({
      username: "api",
    - key: process.env.MAILGUN_API_KEY,+ key: process.env.SENDEMAIL_API_KEY,- url: "https://api.mailgun.net",+ url: "https://mg.send.email",});
  3. Copy over your templates

    Mailgun's template syntax works here unchanged. Create them through mg.send.email with the same API calls, or ask your agent to copy them.

  4. Set up webhooks, routes and suppressions

    Create your webhooks and routes again, and import your suppressions. Update the signing key your code checks.