Migration guide / Transactional email
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.
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>",
});await fetch("https://api.resend.com/emails", {
method: "POST",
headers: { Authorization: "Bearer re_123", "Content-Type": "application/json" },
body: JSON.stringify({ from, to, subject, html }),
});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" },
});import { Resend } from "resend";
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" },
});curl -X POST https://smtpfa.st/api/v1/emails \
-H "Authorization: Bearer $SMTPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "Acme <[email protected]>",
"to": [
"[email protected]"
],
"subject": "Reset your password",
"html": "<p>Your link: ...</p>",
"category": "transactional"
}'import { SMTPfast } from "@smtpfast/sdk";
const smtpfast = new SMTPfast(); // reads SMTPFAST_API_KEY
const { id } = await smtpfast.emails.send({
from: "Acme <[email protected]>",
to: ["[email protected]"],
subject: "Reset your password",
html: "<p>Your link: ...</p>",
category: "transactional",
});| Resend | SMTPfast |
|---|---|
| POST https://api.resend.com/emails | POST 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 header | Idempotency-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_id | Not read on POST /emailsTo send to a topic, create a broadcast with topic_id. |
| No category field | category: transactional | marketingDefaults to marketing. Or send the X-SMTPfast-Category header. |
| Resend | SMTPfast |
|---|---|
| Host smtp.resend.com | Host 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 resend | Username smtpfast |
| Password API key | An SMTPfast API key with the email:send scope |
| Resend | SMTPfast |
|---|---|
| email.sent, email.delivered | email.sent, email.delivered |
| email.delivery_delayed | email.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.failed | email.bounced, email.complained, email.failed |
| email.opened, email.clicked, email.received | email.opened, email.clicked, email.received |
| email.scheduled, email.suppressed | email.scheduled, email.suppressed |
| contact.created, contact.updated, contact.deleted | contact.created, contact.updated, contact.deletedBulk contact upserts fire no contact events. |
| domain.created, domain.updated, domain.deleted | domain.created, domain.updated, domain.deleted |
| suppression.*, topic.*, contact.topics.updated | No 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 } |
| Resend | SMTPfast |
|---|---|
| Templates with {{{VARIABLE}}} | Templates with {{{VARIABLE}}}Same API and the same send shape: template: { id, variables }, by id or alias. |
| Contacts, segments, topics | Contacts, 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. |
| Broadcasts | BroadcastsOur create request has its own fields (audience, segment_id, markdown or html). Port those calls by hand. |
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.
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).
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.
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.
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]"] }'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);
}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.
Check these before you move. If one is a blocker, stay where you are.
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.
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.
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.
Verify a domain, send a test and check it in Logs before you move any traffic. Webhooks and inbound mail need a paid plan.