Skip to main content

Migrating from Resend to Mailofly

If you love modern, developer-centric email APIs but need multi-account sending identities, integrated broadcast campaign management, unified subscriber CRM with topics, or AI Model Context Protocol (MCP) integration, migrating from Resend to Mailofly takes only a few minutes. Because Mailofly shares a modern, developer-first philosophy, our SDK interfaces and payload models are nearly 1:1 compatible.

Key Benefits of Mailofly

  • Multi-Identity Sending: Send from multiple brands, client sub-accounts, or environments using a single unified API key and lightweight account_key routing.
  • Unified Audiences & Broadcasts: Manage transactional emails and rich visual marketing broadcasts under one roof—no need for separate third-party newsletter tools.
  • Native AI MCP Server: Connect Mailofly directly to AI assistants (Cursor, Claude Desktop, Antigravity) via @mailofly/mcp.
  • Zero Template Lock-in: Full support for React Email, standard HTML/CSS, and server-side mustache templates.

1. Domain Setup & DNS

Your existing Resend DKIM records will not conflict with Mailofly. Both can operate side-by-side during your transition:
  1. In the Mailofly dashboard, go to DomainsAdd Domain.
  2. Add the unique DNS records provided by Mailofly:
    • DKIM: Unique selector mailofly._domainkey.yourdomain.com (coexists with resend._domainkey).
    • SPF: Add include:mailofly.com to your domain’s SPF record. If you already have include:resend.com, you can temporarily keep both:
  3. Verify the domain in your dashboard.

2. API & SDK Parameter Mapping

The parameters used to dispatch emails map directly between Resend and Mailofly:

3. Code Migration Examples

Node.js / TypeScript

First, replace the package:
Update your sending code:

Python


Raw HTTP / cURL


4. React Email Support

If you authored your email components using @react-email/components, no refactoring is required. You can render your React templates to HTML using @react-email/render and pass the markup directly to Mailofly:

5. Webhooks Migration

Both Resend and Mailofly adhere to modern security standards for webhook signatures.

Event Names Mapping

Verifying Webhook Signatures in Next.js / Express


6. Audiences & Contacts Migration

If you use Resend Audiences to store subscriber lists:
  1. Export from Resend:
    • Go to Resend Dashboard → Audiences.
    • Export your contact list to a .csv file.
  2. Import into Mailofly:
    • Navigate to Audiences > Contacts.
    • Click Import CSV.
    • Map standard columns (email, first_name, last_name, unsubscribed) and any custom metadata properties.
    • Assign imported contacts to relevant Topics (e.g., Product Updates, Weekly Newsletter).

Migration Checklist

  • Add domain to Mailofly and configure DNS records (mailofly._domainkey).
  • Verify SPF includes include:mailofly.com.
  • Swap @mailofly/node (or mailofly Python package) in your codebase.
  • Update environment variables with MAILOFLY_API_KEY.
  • Point webhook endpoints to Mailofly Webhooks in the dashboard.
  • Export and import contacts & suppressions into Mailofly.
  • Remove legacy Resend SPF entries once 100% of traffic is switched.