Updated · 7 min read
SMTP vs API sending: which integration pattern your program needs
An engineer asks how the marketing system should hand mail to your ESP. There are two answers: SMTP relay or HTTP API. Both work. They differ on reliability, latency, what features you get, and how much engineering time they demand. Almost every program at scale ends up running both, each doing what it's best at. Here's the decision framework, minus the false binary.

By Justin Williames
Founder, Orbit · 10+ years in lifecycle marketing
Two ways to hand mail to your ESP
Picture the moment your app needs to send an email — a welcome, a password reset, a campaign blast. It has to hand the message to your ESP (Email Service Provider — the vendor that does the actual sending, like SendGrid or Postmark) somehow. There are exactly two protocols for that handoff, and they could not be more different in flavour.
SMTP (Simple Mail Transfer Protocol — the standard email servers have used to talk to each other since 1982). Your system opens a connection to the ESP's SMTP server, hands over a fully composed email, and the ESP takes it from there. Works with every email library, every language, every framework. Comforting or horrifying, depending on how much you've had to debug it.
API (an HTTP-based programmatic interface — the same kind of call your app already makes to Stripe or Shopify). Your system makes an HTTPS request to the ESP with the recipient, a template ID, merge variables, and metadata as JSON. The ESP composes and sends. Structured, fast, feature-rich, and noticeably tied to the specific vendor you picked.
SMTP is universal and battle-tested. API is fast, structured, and modern. Neither is "better" — they solve overlapping but different problems, and most programs use both.
Does one deliver better than the other? No. Deliverability — your ability to land in the inbox rather than spam — is a function of reputation, authentication, and content. Both SMTP and API senders can have excellent or terrible inbox placement depending on how they're used. The integration pattern doesn't shift that outcome. Don't let anyone sell you otherwise.
The trade-offs side by side
Before the recommendations, the eight dimensions that actually matter when you're choosing. Skim the table; the ones with the biggest gap are the ones that should drive your call.
| Dimension | SMTP | API |
|---|---|---|
| Integration effort | Low (every lang has a library) | Medium (ESP-specific SDK or HTTP) |
| Latency | ~500ms–2s per message | ~50–200ms per call |
| Throughput | Connection-bound; harder at high volume | Scales horizontally |
| Feature access | Basic sending only | Templates, merge vars, tracking opts, batching |
| Deliverability feedback | Bounces via return-path; delayed | Webhooks; near real-time |
| Dependency on ESP | Loose (standard protocol) | Tight (ESP-specific payload format) |
| Template management | Client-side (compose the email) | ESP-side (reference by ID) |
| Typical use case | Legacy apps, low-volume, fallback | Modern lifecycle, high-volume, rich data |
Is API faster in practice? Usually yes — API calls finish around 100ms versus SMTP's 1–2 seconds, most of that gap being SMTP's connection setup and handshake. At low volume it doesn't matter. At high volume it matters a lot.
When you reach for SMTP
Four situations where SMTP is the right call — not because it's clever, but because the alternatives create work nobody asked for.
A legacy system already speaks it. CRMs, ticketing tools, ancient CMS products that already know how to speak SMTP. Swapping them to API is engineering work; pointing them at your ESP's SMTP endpoint is configuration. Don't migrate for its own sake.
Volume is low and the use case is simple. A notification system sending 1,000 mails a month doesn't need template management or rich tracking. SMTP is overhead-free. Simpler system, fewer things to maintain, done.
You want a fallback when the API breaks. Many programs run API as primary and SMTP as the backup when the API is down. Belt-and-braces redundancy that costs little to configure.
You don't want to be locked to one vendor. SMTP is standard. Migrating between ESPs that support SMTP relay is a DNS change. API-native integrations have to be re-coded per vendor — the kind of thing engineering finds out about during the migration planning meeting.
When you reach for API
The flip side. Four situations where API isn't a nice-to-have, it's the only sensible answer.
You're sending serious volume. At 100K+ sends a day, API's throughput and batching advantages show up clearly. SMTP connection limits turn into a real bottleneck. At 10K sends an hour, both handle it; at 100K an hour SMTP needs serious connection pooling; at 1M an hour API wins on every dimension that matters.
You want templates and merge fields managed in the ESP. API lets you reference a template ID and pass merge variables — the personalised values like first name or order total injected into a template at send time — keeping content management in the ESP and just flowing data through the integration. SMTP wants the full composed email, which means content edits are code changes.
You need event tracking that doesn't lag. With API you get webhooks — small HTTP callbacks the ESP fires at your system the moment something happens — for delivery, opens, clicks, bounces, and complaints in near real-time. SMTP gives you delivery status through the return-path (the technical bounce address baked into every SMTP envelope), and any richer tracking is machinery you have to build yourself.
You've got rich lifecycle logic to carry. Metadata travels on every API call — user ID, campaign ID, segment — landing alongside the send record and making analytics and incident triage less painful later. This is the quiet reason most modern lifecycle programs go API-first.
Starting from scratch with a modern ESP? Go API. The feature set pays for itself quickly. Starting from a working SMTP integration? Don't touch it unless there's a specific reason to.
Why most programs end up running both
Here's what actually happens at scale: the marketing team's sending campaigns through API, the auth system's firing password resets through SMTP, support's ticketing tool is on SMTP because it shipped that way in 2014, and somehow it all works. Not by accident — it's the rational endpoint, because the jobs really are different.
API for marketing and lifecycle: broadcast campaigns, triggered flows, transactional that carries rich logic. The main channel, optimised for throughput and observability.
SMTP for adjacent systems: legacy CRMs, support ticketing, auth-system password resets. Systems that aren't worth re-integrating for the marginal feature win.
Can you use both with the same ESP? Yes — most ESPs support both, and running them in parallel is common. Just keep them on separate subdomains if the mail types differ (marketing API plus transactional SMTP, for example), because otherwise a marketing incident takes your password-reset mail with it.
,
The four things that bite you in production
Whichever you pick, the failure modes are predictable. The teams who avoid them are the teams who set the tripwires up front, before the first send goes out.
Retries. API errors need app-level retry logic with exponential backoff — wait a bit longer between each retry so a struggling ESP isn't hammered. SMTP has retry built into the protocol itself. When API integration code isn't handling errors, you're silently dropping mail on transient failures and won't notice until someone on support asks why a welcome email never arrived.
Rate limits. APIs enforce requests per second. SMTP enforces concurrent connections. Batch your API calls to stay under limits; pool SMTP connections. Either way: handle 429s gracefully — that's the HTTP status code an API returns when you're asking too fast, and ignoring it gets your sender flagged.
Authentication. SMTP uses per-connection credentials. API is a per-request API key or OAuth — a token-based auth standard where the ESP issues short-lived credentials your system refreshes automatically. Rotate keys regularly — and yes, that means automating the rotation, because the "we'll rotate quarterly" plan always turns into the "we haven't rotated in two years" plan.
Monitoring. For API, send to a test address and verify the webhook fires. For SMTP, run a smoke test that ships from the real production code path. Silent send failures are one of the top three lifecycle incidents year after year, and they're always discovered by a customer, never by the team.
A quick word on the providers people ask about. AWS SES, Postmark, SendGrid all offer SMTP and API, and they differ on pricing, feature emphasis, and target use case — SES for raw infrastructure at low cost, Postmark for transactional reliability, SendGrid for broader marketing. The SMTP-vs-API choice is orthogonal to which ESP you pick.
The Deliverability Management skill has the decision framework for teams picking integration patterns for a new system, and the specific redundancy patterns used at scale.
Read to the end
Scroll to the bottom of the guide — we'll tick it on your reading path automatically.
This guide is backed by an Orbit skill
Related guides
Browse allDomain vs IP reputation: which one actually matters
Deliverability reputation is two parallel scores, not one. IP and domain behave differently, recover differently, and the balance between them has shifted hard toward domain over the past five years. Here's what that means for what you monitor and how you warm up.
Email deliverability — the practitioner's guide
Deliverability isn't a setting. It's the running total of every send decision you've made since you bought the domain. Four pillars hold it up. Break one and the whole program starts leaking.
The unsubscribe page is the most important page in your lifecycle program
The page every lifecycle team ignores is the one quietly deciding sender reputation, suppression-list quality, and the fate of next quarter's deliverability. A short defence of why it deserves the ten-minute rebuild.
SPF, DKIM, and DMARC explained for lifecycle marketers
Three DNS records decide whether Gmail trusts your marketing email or quietly bins it. Gmail and Yahoo made all three mandatory for bulk senders in 2024 and the grace period is over. This is the practitioner's explainer: what each record does in plain English, how they interact, and the setup order that won't accidentally block your own mail.
Dedicated vs shared IP: the real decision
Every ESP sales conversation pitches the dedicated IP as an upgrade. For most lifecycle programs it isn't — it's a trade, and often a losing one. Here's the volume threshold that actually justifies dedicated, the risks most teams don't anticipate, and when the shared pool is genuinely the better call.
List hygiene: the six-rule policy
List hygiene isn't cleanup; it's a continuous policy that runs automatically. Here's the six-rule policy every lifecycle program should have written down, each tied to a specific deliverability outcome.
Found this useful? Share it with your team.
Use this in Claude
Run this methodology inside your Claude sessions.
Orbit turns every guide on this site into an executable Claude skill — 63 lifecycle methodologies, 91 MCP tools, native Braze integration. Free for everyone.