Migrate from Resend

Move from Resend
to Nextmail.

Point the Resend SDK at Nextmail and keep your code, or convert it to the Nextmail SDK. Audiences, contacts, templates and webhooks come across with one key.

The same email,
written both ways.

One message with a reply-to address and a tag, sent through Resend and then through Nextmail.

Resend
import { Resend } from 'resend' const resend = new Resend(process.env.RESEND_API_KEY) const { data, error } = await resend.emails.send({  from: 'Acme <billing@acme.com>',  to: ['ada@example.com'],  replyTo: 'support@acme.com',  subject: 'Your invoice is ready',  html: '<p>Thanks for your order.</p>',  tags: [{ name: 'category', value: 'invoice' }],}) if (error) {  console.error(error.message)} else {  console.log(data.id)}
Nextmail code
import { init, nextmail } from '@nextmail/sdk' init({ apiKey: process.env.NEXTMAIL_API_KEY }) try {  const email = await nextmail.emails.send({    from: 'Acme <billing@acme.com>',    to: ['ada@example.com'],    replyTo: 'support@acme.com',    subject: 'Your invoice is ready',    html: '<p>Thanks for your order.</p>',    tags: { category: 'invoice' },  })  console.log(email.id)} catch (error) {  console.error(error.message)}

Field by field,
what goes where.

Each option Resend takes, and its place in Nextmail.

ResendNextmailNotes
from, to, cc, bcc, subject, html, textfrom, to, cc, bcc, subject, html, textSame names and the same meaning.
reply_toreplyToOne address per message.
tags: [{ name, value }]tags: { name: value }Up to 10 key and value pairs.
reacthtmlRender the component to HTML first.
attachments[].pathattachments[].contentFetch the file and pass its bytes.
scheduled_atscheduledAtA date, an ISO time or a duration.
Idempotency-KeyidempotencyKeySame meaning, 255 characters at most.
batch.sendemails.sendBatchUp to 100 emails, each sent on its own.
contacts.create({ audienceId })contacts.create({ audienceIds })One name field, several audiences.

Converter

Paste your Resend code,
get it back on Nextmail.

Pick where the code comes from and its language. Recognised keys are removed in your browser, and nothing you paste is kept.

From Resend
Your Resend code
Nextmail code

Your Nextmail code appears here

Paste a file, or load an example, then convert.

0 of 12,000 charactersRecognised keys are removed before sending.

Coming from Resend?
Change two lines.

Point the Resend SDK at Nextmail and keep your code, then bring contacts, templates and webhooks across.

Read the Resend guide

Two differences: a message takes one reply-to address, and an inline image referenced by content id arrives as an ordinary attachment.

Your Resend SDK code stays as it is
RESEND_BASE_URL=https://api.nextmail.sh/compat/resendRESEND_API_KEY=oe_live_…

Answered in Resend's own shapes and error names

Bring the rest with one key

  • Suppressions
  • Audiences
  • Contacts
  • Templates
  • Webhooks

Bring the rest
with one key.

Paste a Resend key, check what is there and start the import. Data moves across, and domains and keys arrive as a checklist, so nothing is left behind.

Move from another provider

Bring your setup over from Resend, SendGrid, Postmark, Mailgun or Mailchimp with one key.

Resend API key
Use a full-access Resend key. Revoke it afterwards.
re_••••••••••••••••
Suppressions
214 found
Bounced, complained and blocked addresses keep their reason.
Audiences
3 found
Each segment or list becomes an audience.
Contacts
8,532 found
Only subscribed contacts arrive, with their names.
Templates
12 found
Arrive as HTML templates with variables declared.
Webhooks
2 found
Added switched off, since signing differs here.
Domains checklist
2 found
Lists each domain with records to publish.
API keys checklist
3 found
Lists each key so you can recreate it.
Keep your code
Set these two variables to send through Nextmail.
.env
RESEND_BASE_URL=https://api.nextmail.sh/compat/resendRESEND_API_KEY=oe_live_…
What to bring across

Webhook events,
renamed.

Each Resend event and the Nextmail event that replaces it. Every request carries one event, signed.

ResendNextmail
email.sentemail.sent
email.deliveredemail.delivered
email.delivery_delayedemail.delivery_delayed
email.bouncedemail.bounced
email.complainedemail.complained
email.openedemail.opened
email.clickedemail.clicked
email.failedemail.failed
contact.createdcontact.created
contact.updatedcontact.updated
contact.deletedcontact.deleted

Moving from Resend,
answered.

Converted?
Create the key it reads.

A workspace takes a minute. Add your domain, create an API key and set NEXTMAIL_API_KEY.