/ Email Types — Authentication & Access
The OTP email: a race against the clock.
A one-time passcode is the single most time-critical message your product sends. The user is mid-login, watching a code field, and the code itself expires in under a minute. There's no slack. This is about the infrastructure that wins that race — delivery measured in seconds, every time.
/ The short answer
A one-time passcode (OTP) email delivers a short, single-use code that a user enters to complete a login or verify an action as a second authentication factor. It is the most latency-critical email there is: the user is mid-login waiting on the code, and the code itself typically expires in 30 to 60 seconds. A delay of even 20 seconds eats a meaningful share of that window, and a code that arrives after expiry is useless — the user is left re-requesting and retrying.
Everything about OTP delivery comes down to speed and reliability under a brutal time constraint. That makes it the purest infrastructure problem of any email type: it needs an isolated, fast sending path, airtight authentication for inbox placement, and a code presented so it's usable the instant the message lands.
/ Why it's different
Why is the OTP the most time-critical email of all?
A password reset is urgent, but it grants minutes of slack — its token commonly lives for fifteen. An OTP grants almost none. The code is deliberately short-lived for security, often expiring in under a minute, and the user isn't recovering access at their leisure; they're in the middle of an active login, stopped at a code-entry field, unable to proceed until the digits arrive. The combination of an extremely short validity window and a user waiting in real time makes this the tightest delivery constraint in all of email.
The arithmetic is unforgiving. If a code is valid for 60 seconds and your delivery takes 20, you've already spent a third of its life before the user can even read it — and they still need time to switch to their inbox, find the message, and type the code back. If delivery takes 45 seconds, the code may expire mid-entry. Where most email treats a few seconds of latency as irrelevant, OTP treats it as a material fraction of the entire budget. This is why OTP delivery can't be approached as ordinary sending with a faster wish attached; it has to be engineered for speed from the start.
There's also a frequency dimension that compounds the challenge. Unlike a password reset, which a given user triggers rarely, an OTP can fire on every login for users who have two-factor enabled. That turns OTP into a higher-volume, always-on stream where consistent low latency has to hold under load, not only on a quiet day, across every mailbox provider your users rely on. Speed that's reliable at low volume but degrades under traffic is, for OTP, the same as no speed at all.
/ The race
Where do the seconds go when a code expires in sixty?
The OTP flow looks like the password reset's, but every step competes against a clock that's already running. The validity window opens the instant the code is generated, and delivery latency is subtracted directly from it.
The clock starts at step two, the moment the code is generated, and it doesn't stop for delivery. That reframes the whole flow: the goal isn't merely fast delivery but delivery fast enough to leave the user time to read and type the code before expiry. The platform accepting the message (step three) and the MTA relaying it (step four) are where you either preserve or squander that budget — and queuing the OTP behind a bulk send, even briefly, is the single most common way the budget gets blown.
Step five carries a wrinkle unique to codes: the code has to be immediately readable. If it's rendered in an image or hidden behind a link, the user loses precious seconds, and pre-fetching systems can interact with it oddly. A code presented as plain text in the body is available the instant the message arrives — which, when seconds matter, is the whole point.
/ The honest part
Email OTP: the accessible option, not the strongest
It's worth being straight about where email sits among two-factor methods, because it shapes how much the infrastructure matters. Email OTP is the most accessible second factor: it needs no phone number, no separate authenticator app, and no hardware — just an email address the user already has. That reach is its genuine advantage, and it's why so many products offer it as the default or fallback second factor.
It's also the weakest of the common methods, and pretending otherwise helps no one. Because the second factor is delivered to an email account that can itself be compromised, email OTP provides less assurance than an authenticator app generating codes locally, or a hardware security key. A determined attacker who has already breached the user's email gains little additional barrier from an email OTP. The realistic framing is that email OTP is a pragmatic baseline — meaningfully better than no second factor, usable by everyone, but not the choice for the highest-security contexts, where app-based or hardware factors belong.
What this means for infrastructure is direct: since email OTP's whole value proposition is accessibility and convenience, that value collapses entirely if the code is slow or unreliable. A second factor people abandon because it doesn't arrive in time provides no security at all — only friction and abandoned logins. So for the products that do offer email OTP — and that's most of them — getting the delivery infrastructure right is what makes the feature worth having at all, not a refinement layered on afterward. The accessible option only stays worthwhile when it actually works every time.
/ What it needs
The requirements, with speed above all
OTP shares the transactional baseline with every other access email, but it reorders the priorities: speed moves to the top, and a code-specific concern joins the list.
Latency, first and hardest
For OTP, low latency is the defining requirement, ahead of everything else. The sending path must accept and relay the code in seconds, which in practice demands an isolated stream that's never queued behind bulk mail, and an MTA built for transactional speed under load. This is the requirement that fails most often and matters most, because every other strength is wasted if the code arrives after it expires.
Authentication for placement and trust
A code in the spam folder is a code the user never sees, so SPF, DKIM, and aligned DMARC are non-negotiable for inbox placement. They also matter for trust: OTP and login alerts are heavily impersonated by phishers, and enforced authentication helps receivers and users tell your real codes from fakes.
A code that's instantly usable
Unique to OTP: the code must be plain, readable text in the message body, not rendered in an image, not hidden behind a link, not dependent on remote content loading. This makes it usable the moment the message arrives and avoids odd interactions with the pre-fetching used by Mail Privacy Protection and similar systems. A well-formed OTP looks like this under the hood:
From: YourApp Security <no-reply@auth.yourapp.com> To: user@example.com Subject: 482913 is your YourApp verification code Authentication-Results: mx.example.com; spf=pass; dkim=pass header.d=yourapp.com; dmarc=pass header.from=yourapp.com (policy=reject) Your verification code is: 482913 It expires in 60 seconds. Do not share it with anyone.
Notice the code in the subject line as well as the body — a small touch that lets the user read it from a notification without even opening the message, shaving seconds off the race. There's no marketing, no link required to use the code, and authentication that passes and aligns under an enforced DMARC policy.
/ What goes wrong
How do OTP emails fail?
OTP failures are mostly variations on a single theme — the code didn't arrive usable, in time — but they trace to distinct infrastructure causes.
The expired code. The most common failure: the email arrives, but after the short window closed, so the code is already dead. This is a pure latency problem, almost always caused by the OTP sharing a queue or path with slower mail. The user re-requests, often repeatedly, multiplying volume and frustration.
The spam-foldered code. The code arrives in time but in spam, where the mid-login user won't think to look. This is an authentication or reputation failure — and especially damaging for OTP because the user has no patience to go hunting for it.
The unreadable code. The message arrives fast and in the inbox, but the code is in an image that didn't load, or behind a link that adds a step. The infrastructure delivered, but the design wasted the seconds the infrastructure saved. Plain-text codes avoid this entirely.
The retry storm. When codes are slow, users request more — and a flood of OTP requests during an outage or slowdown can itself strain an undersized sending path, making the latency worse in a feedback loop. A stream built for the peak, with headroom, is what keeps a bad moment from compounding into a worse one.
/ The window budget
Does the window cover delivery and the human?
How long the code stays valid. Shorter is more secure.
Request to inbox. This is the part infrastructure controls.
budget across the validity window
\u2014
\u2014
Illustrative; read+type is modelled at ~18s. The lesson holds regardless of the exact number: lengthening the window weakens security, so faster delivery \u2014 not a longer window \u2014 is the real fix.
/ The checklist
The OTP delivery checklist
A reliable OTP rests on the transactional baseline with speed pushed to the front and a couple of code-specific rules added.
Isolate the OTP stream so it never queues behind other mail and takes the fastest path available — for this type, isolation is about speed as much as reputation. Authenticate fully with SPF, DKIM, and aligned DMARC at enforcement, both for inbox placement and to blunt the phishing that targets login codes. Put the code in plain text in the body, and ideally in the subject line too, so it's readable the instant the message lands and unaffected by pre-fetching. Set the expiry window honestly against your real delivery speed: short for security, but not so short that normal delivery latency routinely beats the user to expiry. Size the stream for peak load with headroom, so a surge of logins or a retry storm doesn't turn into the slowdown that caused it. And monitor delivery latency and inbox placement for the OTP stream specifically, because for this email a problem you notice an hour late has already failed thousands of logins.
The thread through all of it is that OTP punishes every weakness in transactional infrastructure faster and more visibly than any other email type. It's the canary: if your OTP delivery is fast and reliable under load, the rest of your transactional mail almost certainly is too. Getting it right is the work of operating a real transactional sending stream — which is exactly what managed delivery provides, so the codes your users depend on arrive with seconds to spare. The reason this matters so much is that OTP sits on the critical path of the login itself: when it's slow or unreliable, the damage isn't a missed marketing touch but a user who cannot get into your product right now, often abandoning the attempt entirely. Few infrastructure problems convert so directly into lost sessions, support tickets, and the quiet erosion of trust that comes from a security feature that feels broken. And because the failure happens in the sending layer rather than the application, it stays invisible to every dashboard the product team watches — which is exactly why treating OTP delivery as a first-class infrastructure concern, monitored and operated deliberately, is what separates a second factor that protects users from one that merely frustrates them.
/ Questions
How fast does an OTP email need to arrive?
Faster than any other email — within a handful of seconds. A one-time passcode is requested mid-login by a user who is staring at a code-entry field, and the code itself usually expires in 30 to 60 seconds, sometimes less. Where a password reset has minutes of slack, an OTP has almost none: a 20-second delivery delay can consume a third of the code's entire lifetime. Achieving that speed is purely an infrastructure property, determined by how fast your platform accepts and relays the message and whether it's queued behind any other mail.
Why is my OTP email arriving after the code expires?
Because delivery latency is eating the code's short lifetime. The most common causes are the OTP mail sharing a sending path with bulk or marketing mail and waiting in the same queue, an MTA that isn't optimized for transactional speed, or a sending platform that treats all mail the same regardless of urgency. The fix is infrastructural: isolate the OTP stream so it's never queued behind other sends, and run it on a fast, uncongested path. Lengthening the code's expiry to compensate trades security for a problem better delivery would solve directly.
Why didn't I receive my OTP email at all?
When a code never seems to arrive, the cause is almost always placement or speed rather than a broken send. A code that lands in spam reads to the user as missing, since few people check the spam folder for a login code, and that usually traces back to an authentication or reputation problem. A code that is merely slow arrives after the user has already given up and moved on. Less often, the address is mistyped, or a provider is deferring mail from a sender it does not yet trust. Each of these causes lives in the sending layer rather than your application, so the durable answer is faster, authenticated delivery on a reputable, isolated stream.
Is email a good channel for two-factor authentication?
It's the most accessible 2FA channel and the weakest of the common ones. Email OTP requires no phone number and no separate app, so it has the broadest reach — but because email accounts can themselves be compromised, it provides less security than an authenticator app or a hardware key. The honest position is that email OTP is a pragmatic baseline: better than no second factor, widely usable, but not the strongest option. If you offer it, its value depends entirely on the code arriving fast and reliably, which makes its delivery infrastructure the thing that determines whether it works at all.
Can Apple Mail Privacy Protection cause problems with OTP emails?
It can, in edge cases. Mail Privacy Protection and similar systems pre-fetch message content, including images and sometimes links, on the provider's servers before the user opens the message. For an OTP delivered as plain text in the body this is harmless, but designs that put the code behind a link, or that rely on a tracking pixel to confirm delivery, can behave unexpectedly. The safe pattern is to put the code itself as plain readable text in the email body, not behind a link or in an image, so it's available the instant the message arrives regardless of pre-fetching.
Should OTP emails use a separate sending stream?
Yes — arguably more than any other transactional type. Because OTP delivery is the most latency-sensitive, it should never wait in a queue behind other mail, which means isolating it onto its own stream isn't just about reputation but about speed. A dedicated stream for OTP and security mail ensures these messages take the fastest path and aren't slowed by a bulk send happening at the same moment. For a high-volume sender, this isolation is one of the clearest infrastructure wins available.
/ In context
How does the OTP compare to the password reset?
The OTP and the password reset are close cousins — both are access mail the user is actively waiting on — but the OTP sits at the extreme of every axis they share. Its validity window is shorter, often by an order of magnitude: minutes for a reset token versus under a minute for a code. Its frequency is higher, because an OTP can fire on every login while a reset is occasional. And its tolerance for any delay is lower, because the user is mid-action rather than recovering at their own pace. Where the password reset gives the infrastructure a little room to breathe, the OTP gives it almost none.
That makes the OTP the most demanding member of the access-email family, which also includes account verification and magic-link login. The useful consequence is that infrastructure built to deliver OTP reliably will comfortably handle the others: if your sending path is fast and isolated enough for a code that expires in sixty seconds, it's more than fast enough for a reset token that lives for fifteen minutes. OTP is the high-water mark — solve it, and the rest of your access mail is solved by the same isolated, fast stream and enforced authentication that solved it.
/ At scale
OTP under load: where speed has to hold
OTP volume isn't steady — it spikes with login activity, which itself spikes at predictable and unpredictable moments: the start of the business day, a product launch, a marketing campaign that drives sign-ins, an incident that prompts a wave of logins. The defining test of OTP infrastructure is whether it stays fast at the peak, not merely on a quiet afternoon, when the largest number of users are all waiting on codes at once. A sending path sized only for average load will deliver beautifully until the moment it matters most, then slow exactly when the most people are affected.
Two infrastructure properties protect against this. The first is headroom: a stream provisioned for the peak with margin to spare, so a surge doesn't push delivery latency past the code's expiry. The second is stream isolation — keeping OTP off any path shared with bulk mail means a large marketing send can never compete with codes for capacity at the wrong moment. Both come back to the same principle that runs through every access email: the most critical mail deserves dedicated, generously-sized, isolated infrastructure, because the cost of it being slow is measured in users who can't log in, support tickets that pile up at exactly the wrong moment, and quiet erosion of trust in a login meant to just work. Maintaining that headroom and isolation as volume grows is continuous operational work, and it's a core part of what managed delivery exists to carry.
The code is only as good as its delivery. We win the race.
An isolated, fast stream, enforced authentication, and latency monitoring are what get a one-time passcode to the inbox in seconds — the infrastructure we operate. Bring us the codes your logins depend on.
Book infrastructure reviewRelated capabilities