← All migration guides

Migration guide / Transactional email

Migrate from Resend to SMTPfast.

The send API takes Resend's request shape, so most code needs a new base URL, a new key and a category.

SMTPfast accepts Resend's field names on POST /emails, /emails/batch, templates, contacts, segments, topics and suppressions. The Resend Node.js SDK works with a different base URL. What changes is the webhook signature, one default (an email without a category is marketing), and a few fields we do not read.

Resend details checked against its own docs on 2026-12-02. Still deciding? SMTPfast vs Resend.

Move to SMTPfast if

  • You want an SMTP bridge, webhooks and a hosted MCP server behind the same Resend-style API.
  • You send attachments in batches: SMTPfast batch items can carry attachments.
  • You want marketing opt-outs that do not block receipts and password resets.

Stay on Resend if

  • You rely on attachments by URL (path), more than 25 MB of attachments, or natural-language scheduled_at.
  • You send to a topic with topic_id on POST /emails, or use suppression.* or topic.* webhook events.
  • You need a dedicated IP.

The code change.

With the Resend Node.js SDK, pass the SMTPfast base URL and key (or set RESEND_BASE_URL and RESEND_API_KEY) and add X-SMTPfast-Category: transactional to mail people need. The SDK still renders react to HTML before it sends. Without the header, SMTPfast treats the email as marketing and adds an unsubscribe link.

Before: Resend

import { Resend } from "resend";

const resend = new Resend("re_123");

await resend.emails.send({
  from: "Acme <[email protected]>",
  to: ["[email protected]"],
  subject: "Reset your password",
  html: "<p>Your link: ...</p>",
});

After: SMTPfast

- const resend = new Resend("re_123");
+ const resend = new Resend(process.env.SMTPFAST_API_KEY, {
+   baseUrl: "https://smtpfa.st/api/v1",
+ });

  await resend.emails.send({
    from: "Acme <[email protected]>",
    to: ["[email protected]"],
    subject: "Reset your password",
    html: "<p>Your link: ...</p>",
+   headers: { "X-SMTPfast-Category": "transactional" },
  });

What maps to what.

Sending
ResendSMTPfast
POST https://api.resend.com/emailsPOST https://smtpfa.st/api/v1/emailsSame body: from, to, cc, bcc, reply_to, subject, html, text, headers, tags, scheduled_at, template, attachments.
POST /emails/batch (100 per call)POST /v1/emails/batch (100 per call)Attachments work in SMTPfast batch items, 25 MB in total per request. Resend's batch does not take them.
Idempotency-Key headerIdempotency-Key headerA repeat with the same key and body within 24 hours returns the first id.
attachments[].path (file by URL)No equivalentSend the file as base64 content.
scheduled_at: "in 1 min"A date, such as ISO 8601, up to 30 days aheadA natural-language value like "in 1 min" is refused with 400.
topic_idNot read on POST /emailsTo send to a topic, create a broadcast with topic_id.
No category fieldcategory: transactional | marketingDefaults to marketing. Or send the X-SMTPfast-Category header.
SMTP
ResendSMTPfast
Host smtp.resend.comHost smtp.smtpfa.st
Ports 465, 2465 (TLS), 25, 587, 2587 (STARTTLS)Ports 587 and 2525, STARTTLSThere is no implicit TLS port (465). Use 587, or 2525 where 587 is blocked.
Username resendUsername smtpfast
Password API keyAn SMTPfast API key with the email:send scope
Webhooks
ResendSMTPfast
email.sent, email.deliveredemail.sent, email.delivered
email.delivery_delayedemail.delivery_delayedNot the same event: it fires when SMTPfast retries handing the email to its provider, not for delays at the receiving server, which SMTPfast does not report.
email.bounced, email.complained, email.failedemail.bounced, email.complained, email.failed
email.opened, email.clicked, email.receivedemail.opened, email.clicked, email.received
email.scheduled, email.suppressedemail.scheduled, email.suppressed
contact.created, contact.updated, contact.deletedcontact.created, contact.updated, contact.deletedBulk contact upserts fire no contact events.
domain.created, domain.updated, domain.deleteddomain.created, domain.updated, domain.deleted
suppression.*, topic.*, contact.topics.updatedNo equivalentSMTPfast adds email.unsubscribed and contact.subscribed.
Svix signature (svix-id, svix-timestamp, svix-signature)X-SMTPfast-Signature: hex HMAC-SHA256 of the raw bodyReplace resend.webhooks.verify or the svix library with the check below.
{ type, created_at, data }{ type, timestamp, data }
Templates, contacts and suppressions
ResendSMTPfast
Templates with {{{VARIABLE}}}Templates with {{{VARIABLE}}}Same API and the same send shape: template: { id, variables }, by id or alias.
Contacts, segments, topicsContacts, segments, topicsResend-style endpoints. The bulk form { contacts: [...] } upserts up to 500 at once.
Suppressions (bounce, complaint, manual)SuppressionsPOST /v1/suppressions/batch/add takes up to 100 addresses.
BroadcastsBroadcastsOur create request has its own fields (audience, segment_id, markdown or html). Port those calls by hand.

Step by step.

  1. 1

    Add and verify your sending domain

    Add the domain in the dashboard (or with POST /v1/domains) and publish the records it shows: three DKIM CNAMEs, an MX and an SPF TXT record for the bounce subdomain (MAIL FROM), and include:amazonses.com in the SPF record of the domain. A domain has one SPF record, so add the include to the one you have. The DKIM and bounce records have their own names, so they sit next to your current provider's records and both can send while you switch. Keep your DMARC record if you have one. On Cloudflare DNS, SMTPfast can add the records for you.

  2. 2

    Create an API key

    Create a key with the email:send scope for the app that sends. Give webhook and contact jobs their own keys with only the scopes they need (webhook:write, contact:write).

  3. 3

    Change the base URL and key

    In the Resend SDK, pass baseUrl: "https://smtpfa.st/api/v1" (or set RESEND_BASE_URL) and the SMTPfast key. With plain HTTP, replace https://api.resend.com with https://smtpfa.st/api/v1. Over SMTP, change the host, the username to smtpfast and the password to the key.

  4. 4

    Label transactional mail

    Add category: "transactional" to the body, or the header X-SMTPfast-Category: transactional through the SDK. Search your code for every send of sign-in codes, resets and receipts. Anything left out is sent as marketing, with an unsubscribe link.

  5. 5

    Copy suppressions, contacts and templates

    Page through GET https://api.resend.com/suppressions and add the addresses with POST /v1/suppressions/batch/add, 100 at a time. Page through GET https://api.resend.com/contacts and send them to POST /v1/contacts as { contacts: [...] }, 500 at a time, with unsubscribed kept. Recreate templates with the same alias, so template sends need no code change.

    curl -X POST https://smtpfa.st/api/v1/suppressions/batch/add \
      -H "Authorization: Bearer $SMTPFAST_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{ "emails": ["[email protected]", "[email protected]"] }'
  6. 6

    Point your webhooks at the new events

    Create a webhook for the email.* events you use and check the X-SMTPfast-Signature header: a hex HMAC-SHA256 of the raw body with the webhook's signing secret. Every event body is { type, timestamp, data }. Failed deliveries are retried 4 more times over about 36 minutes, and you can replay any of them from the delivery log.

    import crypto from "node:crypto";
    
    // rawBody: the request body exactly as received, before JSON.parse
    function isFromSmtpfast(rawBody: string, signature: string, secret: string) {
      const expected = crypto.createHmac("sha256", secret).update(rawBody).digest();
      const given = Buffer.from(signature, "hex");
      return given.length === expected.length && crypto.timingSafeEqual(given, expected);
    }
  7. 7

    Send a test and move traffic in stages

    Send to an address you own and check the email in Logs, then in the received message headers (DKIM and SPF pass, aligned with your From domain). Move one kind of mail first, such as password resets, and watch bounces and complaints for a few days before you move the rest. A new account has warm-up limits, so a large list should not move in one day.

What SMTPfast does not have

Check these before you move. If one is a blocker, stay where you are.

  • No attachments by URL (path). Send base64 content: up to 10 files, 10 MB each, 25 MB of attachments per email, and 25 MB of attachments in a whole batch request. Resend allows 40 MB per email.
  • scheduled_at takes a date (use ISO 8601), up to 30 days ahead. Natural language is refused.
  • topic_id on POST /emails is not read. Topic sends go through broadcasts.
  • No suppression.*, topic.* or contact.topics.updated webhook events, and no Svix signature.
  • No implicit TLS SMTP port (465). Use 587 or 2525 with STARTTLS.
  • Webhooks and inbound mail need a paid plan. The free plan sends from one domain.
  • No dedicated IPs.

Frequently asked questions.

Can I keep the Resend SDK?

Yes, for sending, batch, templates and contacts. Create the client with new Resend(key, { baseUrl: "https://smtpfa.st/api/v1" }) or set RESEND_BASE_URL. Webhook verification is the exception: resend.webhooks.verify checks Svix signatures, and SMTPfast signs with X-SMTPfast-Signature. You can also move to @smtpfast/sdk, which has a category field and signature checks.

Why do I need a category when Resend has none?

SMTPfast keeps marketing opt-outs apart from mail people need. An email without a category is marketing, so it gets a one-click unsubscribe link and is not sent to people who unsubscribed. Label sign-in codes, resets and receipts transactional, and they still reach someone who opted out of marketing.

Do React Email templates still work?

Yes. The Resend SDK renders the react field to HTML on your side before the request, so SMTPfast receives html. With @smtpfast/sdk or plain HTTP, render with @react-email/render and send the html.

Try it on the free plan

Verify a domain, send a test and check it in Logs before you move any traffic. Webhooks and inbound mail need a paid plan.