Migration guide / Transactional email
Message streams become the category field, PascalCase fields become snake_case, and webhooks get a signature.
Postmark splits mail into message streams (transactional and broadcasts), each with its own suppressions and webhooks. In SMTPfast every email carries a category, transactional or marketing, and one team-wide suppression list knows which opt-outs block which category. The send fields map one to one, except Postmark's PascalCase names.
Postmark details checked against its own docs on 2026-12-02. Still deciding? SMTPfast vs Postmark.
Before: Postmark
curl -X POST https://api.postmarkapp.com/email \
-H "X-Postmark-Server-Token: $POSTMARK_SERVER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"From": "Acme <[email protected]>",
"To": "[email protected]",
"Subject": "Your receipt",
"HtmlBody": "<p>Thanks for your order.</p>",
"Tag": "receipt",
"Metadata": { "order_id": "1041" },
"MessageStream": "outbound"
}'After: SMTPfast
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": "Your receipt",
"html": "<p>Thanks for your order.</p>",
"tags": [
{
"name": "tag",
"value": "receipt"
},
{
"name": "order_id",
"value": "1041"
}
],
"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: "Your receipt",
html: "<p>Thanks for your order.</p>",
tags: [
{
name: "tag",
value: "receipt",
},
{
name: "order_id",
value: "1041",
},
],
category: "transactional",
});| Postmark | SMTPfast |
|---|---|
| POST /email, X-Postmark-Server-Token | POST /v1/emails, Authorization: Bearer KEY |
| From, To, Cc, Bcc, Subject, ReplyTo | from, to, cc, bcc, subject, reply_toto, cc and bcc take a string or an array. Postmark takes a comma-separated string. |
| HtmlBody, TextBody | html, text |
| Headers [{ Name, Value }] | headers { "Name": "Value" } |
| Attachments [{ Name, Content, ContentType, ContentID }] | attachments [{ filename, content, content_type, content_id }] |
| Tag (one), Metadata | tags [{ name, value }] (up to 50) |
| TrackOpens, TrackLinks | track_opens, track_clicks (true or false)No HtmlOnly or TextOnly link tracking. |
| MessageStream: outbound / broadcast | category: transactional / marketing |
| POST /email/batch (500 per call) | POST /v1/emails/batch (100 per call)One invalid item refuses the whole batch. An item whose recipients are all suppressed comes back as failed, so check each result, as with Postmark. |
| No scheduled send | scheduled_at (up to 30 days) |
| Postmark | SMTPfast |
|---|---|
| Host smtp.postmarkapp.com | Host smtp.smtpfa.st |
| Ports 25, 587, 2525 (STARTTLS) | Ports 587 and 2525, STARTTLSThere is no implicit TLS port (465). Use 587, or 2525 where 587 is blocked. |
| Username server token or SMTP access key | Username smtpfast |
| Password server token or SMTP secret key | An SMTPfast API key with the email:send scope |
| Postmark | SMTPfast |
|---|---|
| Delivery | email.delivered |
| Bounce | email.bounced |
| SpamComplaint | email.complained |
| Open, Click | email.opened, email.clicked |
| SubscriptionChange | email.unsubscribed |
| Inbound webhook | email.receivedInbound on your own sending domain, on paid plans. |
| Basic auth and IP allowlist | X-SMTPfast-Signature (HMAC-SHA256) |
| Postmark | SMTPfast |
|---|---|
| POST /email/withTemplate, TemplateAlias, TemplateModel | POST /v1/emails with template: { id, variables }id takes the alias too. |
| Mustachio {{ name }} | {{{NAME}}}No #each or sections. Values are strings or numbers. |
| Layouts | No equivalentKeep the shared header and footer in each template, or render the whole email in your code. |
| Suppressions per stream (HardBounce, SpamComplaint, ManualSuppression) | Suppressions, scope all |
| Broadcast stream unsubscribes | Suppressions, scope marketing |
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).
Rename the fields to snake_case, turn Headers into an object, and put Tag and Metadata into tags. Use category: "transactional" where you used the outbound stream and leave it out (marketing) for the broadcast stream.
For each stream, call GET /message-streams/{stream}/suppressions/dump. Add the transactional stream's addresses, and hard bounces and spam complaints from any stream, with POST /v1/suppressions/batch/add, 100 per call. Add broadcast-stream unsubscribes with POST /v1/suppressions and scope marketing.
Recreate each template with the same alias, so template sends keep their id. Write {{ name }} as {{{NAME}}}. Loops and layouts have no equivalent, and variable values are escaped: render those emails fully in your code and send html.
Create a webhook for email.delivered, email.bounced, email.complained and the others you used 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.
The category on each email. Transactional mail has no unsubscribe link and still reaches people who opted out of marketing. Marketing mail gets a one-click unsubscribe link and skips them. Hard bounces and spam complaints block both.
Yes. Event names differ (Delivery becomes email.delivered), the body is { type, timestamp, data }, and you should check the X-SMTPfast-Signature header instead of relying on basic auth in the URL.
Verify a domain, send a test and check it in Logs before you move any traffic. Webhooks and inbound mail need a paid plan.