Password Reset Email: Best Practices, Flow, and a Template That Converts

A secure password reset email carries a single-use link built from a random token that expires in 15 to 60 minutes and is stored only as a hash. The email has one button, a plain-text URL fallback, a stated expiry, an “ignore this if you didn’t request it” line, and a sender name users recognize.

A well-built reset flow closes a security-critical path and gets a frustrated user back into your product in under a minute. It fails when the token logic is insecure, the email is confusing, or the message lands in spam exactly when the user needs it. This guide is for the two people who own the problem: the engineer building the flow and the product or growth person writing the message.

The Token Contract: What Secure Reset Flows Actually Look Like

The security properties of your reset flow come down to how you generate, store, validate, consume, and expire the token. Getting any one of these wrong creates an attack surface.

The OWASP Forgot Password Cheat Sheet is the reference for what follows. Where this post goes beyond it, we say so.

Token generation. OWASP says tokens must be “Generated using a cryptographically secure random number generator.” That rules out predictable sequences, timestamp-based values, or anything derived from user data. Use crypto.randomBytes() in Node.js, secrets.token_urlsafe() in Python, or the equivalent in your stack.

Token storage. OWASP asks that tokens be “Stored in a secure manner, as discussed in the Password Storage Cheat Sheet.” Our recommendation, which is common practice rather than an OWASP requirement, is to store a SHA-256 hash of the token instead of the raw value. A database leak then exposes hashes that cannot be pasted into a reset URL. Store the hash alongside the user ID and expiry.

Token expiry. OWASP says tokens should be “Single use and expire after an appropriate period.” It does not set a number. We recommend 15 to 30 minutes for most B2B SaaS products, because the point of expiry is to shrink the window in which a leaked, forwarded, or shared-inbox link is usable. The table below compares the tradeoffs.

Single use, consumed at the right moment. OWASP lists tokens as “Invalidated after they have been used.” The detail that matters is when the token counts as used. Opening the link is not use. Setting a new password is. Some corporate mail security systems fetch URLs in an inbound message to scan it, so a token that is burned on the first GET request will be dead before the human clicks. The magic link email guide covers this scanner pre-fetch problem in depth, and the email OTP guide covers the code-based alternative. For resets, the safe pattern is: validate the token when the link opens, show the form without consuming anything, and consume the token only when the new password is submitted successfully.

No automatic login. After the password is set, send the user to the normal login screen. OWASP says: “Once they have set their new password, the user should then login through the usual mechanism,” and adds: “Don’t automatically log the user in, as this introduces additional complexity.” Auto-login would also turn a leaked reset link into a full session, skipping any second factor you enforce at sign-in.

Account enumeration. The cheat sheet requires you to “Return a consistent message for both existent and non-existent accounts” and to “Ensure that responses return in a consistent amount of time to prevent an attacker enumerating which accounts exist.” Show the same “if an account exists, you’ll receive an email” response whether or not you found a match.

Rate limiting. OWASP asks you to “Implement protections against excessive automated submissions such as rate-limiting on a per-account basis.” Without it, an attacker can flood a target’s inbox or exhaust your sending quota.

Build the link from configuration, not the request. OWASP warns: “Don’t rely on the Host header while creating the reset URLs to avoid Host Header Injection attacks.” It adds that “The URL should either be hard-coded, or validated against a list of trusted domains.” If your app builds the link from the incoming Host header, an attacker can request a reset for a victim with a forged header and have your own system email the victim a link that points at the attacker’s domain.

Stop the token leaking through the Referer header. OWASP says to “Ensure that the reset password page adds the Referrer Policy tag with the no-referrer value”. Without it, any third-party resource loaded on the reset page, such as an analytics script or a font, can receive the token-bearing URL in the Referer header. Set Referrer-Policy: no-referrer as a response header on the reset page.

The minimal token flow, step by step

  1. Receive the email address from the user.
  2. Look up the account, and do not reveal the result to the user.
  3. Generate token = CSPRNG(32 bytes) encoded as url-safe base64.
  4. Store sha256(token), the user ID, and expires_at = now + 15 to 60 minutes. Mark any earlier outstanding token for that user as invalid.
  5. Build the link from your configured base URL: https://app.example.com/reset?token={raw_token}.
  6. Send the email with that link.
  7. On GET of the link: hash the incoming token, look it up, check expiry and unused status. If valid, render the new-password form with Referrer-Policy: no-referrer. Do not consume the token and do not log anyone in.
  8. On POST of the form: validate the token again, set the new password, delete the token and every other outstanding reset token for that user, invalidate existing sessions (or ask the user, per OWASP), and send the “password changed” email.
  9. Redirect to the normal login page.

The raw token travels only in the email link and in transit over HTTPS. It never persists in your database.

Here is a compact Node.js sketch of the generate-and-verify half. It is an illustration of the pattern, not production code: wire it to your own storage and add the rate limiting from above.

import crypto from "node:crypto";

export function createResetToken() {
  const raw = crypto.randomBytes(32).toString("base64url");
  const hash = crypto.createHash("sha256").update(raw).digest();
  return { raw, hash }; // email `raw`, store `hash`
}

export function tokenMatches(incomingRaw, storedHash) {
  const incoming = crypto.createHash("sha256").update(incomingRaw).digest();
  return (
    incoming.length === storedHash.length &&
    crypto.timingSafeEqual(incoming, storedHash)
  );
}

If your database looks tokens up by hash (the usual approach), the equality check happens in the query. The timing-safe comparison matters when you compare in application code.

Token expiry: security vs. UX tradeoff

These windows are this post’s judgment, not an OWASP table.

Expiry windowSecurity postureUX tradeoffCommon use case
10-15 minutesStrongestUser must act immediately; mobile users may time outFinance, healthcare-adjacent apps
30 minutesStrongComfortable for most usersStandard B2B SaaS
60 minutesModerateUpper end of common practice; OWASP gives no fixed figureConsumer apps with less sensitive data
24+ hoursWeakHighest convenienceNot recommended for accounts with sensitive data

What the Reset Email Must Contain

The email itself is a transactional email triggered by a user action, so its only job is to get the user to the new-password form without friction. Postmark’s password reset guide puts the first rule plainly: “Never send users a password in plain text because it’s a huge security vulnerability.” OWASP says the same thing in its own words when it describes the confirmation email: “do not send the password in the email!” Beyond that, here are the required elements:

One action, one button. The reset link should be an obvious button or bolded anchor. As Postmark notes, “Since the URL will inevitably be clunky with the expiring token, it’s best if the link is the HREF attribute of a link” rather than shown as raw text. Include the raw URL below the button as a plain-text fallback for clients that strip HTML.

A clear expiry statement. Tell the user exactly when the link expires: “This link is valid for 30 minutes.” Vague copy like “this link expires soon” creates support tickets.

An “I didn’t request this” line. A short sentence: “If you didn’t request a password reset, you can ignore this email. Your password will not change.” It reassures the user and tells them nothing happens unless they act.

Request context. A line such as “This request was made on [date and time] from [browser] on [operating system]” helps users judge whether the request was theirs. The site’s transactional email examples guide shows the same idea for other security messages.

Sender identity that matches your product. Use your app or brand name as the From name, not a generic “noreply@” address. Knock’s deliverability guide is blunt about it: “Sending from [email protected] signals low legitimacy,” and it adds that “These addresses increase spam filtering probability.”

No marketing content. Promotional material in a reset email blurs the line between a transactional and a marketing message. Our recommendation is to keep reset emails free of it, since they are triggered by direct user action and should read as plainly functional.

What to include vs. what to leave out

IncludeLeave out
Single reset button (HTML) + plain-text URLProduct news or feature announcements
Expiry time stated clearlySecondary CTAs (“upgrade while you’re here”)
“Didn’t request this? Ignore it” linePersonalization tokens that could fail (render as raw variables)
Request context and a support contact or linkMultiple competing action links
From name matching your productHeavy decorative design that adds nothing to a functional message

Subject Lines That Get Opened Fast

The goal of a reset subject line is clarity and speed, not creativity. The user is locked out and wants confirmation the email arrived.

Patterns that work:

  • [Product]: Reset your password. Unambiguous, brand-first.
  • Your [Product] password reset link. Descriptive, action-ready.
  • Reset your password (link expires in 30 minutes). Urgency without alarm; the expiry is useful, not manipulative.

Patterns to avoid:

  • Anything resembling a phishing subject: “Your account has been compromised”, “Security alert: unauthorized access”, or “Action required” openers, which are a common phishing pattern.
  • Questions such as “Did you forget your password?”. They add an extra cognitive step.
  • Over-personalized subjects that look automated: “Hi {first_name}, your reset link is ready”.

An Annotated Reset Email Template

Below is a minimal reset email. Copy it, adapt the brand voice, and fill in the expiry duration that matches your token contract. Square brackets mark the values your templating layer fills in at send time, and the example URL stands in for your real reset link.


Subject: Reset your [Product] password


Hi [first_name or “there”],

We received a request to reset the password for your [Product] account.

Reset your password →

This link expires in [expires_in_minutes] minutes. If the button above doesn’t work, copy and paste this URL into your browser: https://app.example.com/reset?token=TOKEN

This request was made on [request_time] from [browser] on [operating_system].

If you didn’t request this, you can ignore this email. Your password will not change.

[Product] Support [email protected]


A few notes on this template:

  • Fallback greeting. If your user database has reliable first names, use them. If names are inconsistent (blank fields, “test”, all-caps), “Hi there” is safer than broken personalization.
  • The token URL appears twice, once as the button HREF and once as plain text below. This covers plain-text email clients and clipboard-paste scenarios.
  • Keep the design light. A one-logo header is fine. A plain layout renders consistently across clients and leaves little to go wrong on a message that has to land.
  • Variables, not hard-coded values. The reset URL and expiry change on every send, so they belong in template variables. In Coldletter you can store this as a template and trigger it through the API on a separate transactional stream; the same pattern applies in any sending platform that supports templating.

After the Reset: Confirmation and Sessions

The flow does not end when the password is saved. OWASP’s cheat sheet covers two follow-up steps.

Send a “your password was changed” email. OWASP says to “Send the user an email informing them that their password has been reset (do not send the password in the email!).” This is the user’s only warning if someone else completed the reset. Include a clear path for “this wasn’t me”, such as a link to a recovery or support page. Keep it to a few lines:


Subject: Your [Product] password was changed

Your password was changed on [change_time]. If this was you, no action is needed.

If it wasn’t you, secure your account now: [recovery_link]


Deal with existing sessions. OWASP says to “Ask the user if they want to invalidate all of their existing sessions, or invalidate the sessions automatically.” If the reset happened because an account was compromised, any session the attacker already holds survives a password change unless you end it. Invalidating automatically is the safer default; offering a checkbox on the reset form is the friendlier one.

For users who cannot open a link on the device they are using, a one-time code is the cross-device alternative; see the email OTP guide. If you also send sign-up confirmations, the verification email template post covers that message.

Deliverability: Why Reset Emails Fail to Arrive

A password reset email that arrives 90 seconds late, or lands in spam, becomes a support ticket and a potential churn event. Postmark’s guidance on delivery speed is a practical benchmark: “As a rule of thumb, if it takes an email more than 20 seconds to arrive in an inbox, it’s slow.” It continues: “If it takes more than a minute, your customers might move on (and maybe not come back), or they’ll email support.” Slow delivery also produces duplicate reset requests that add noise to your logs, and users who click an older, already-replaced link.

The most common infrastructure mistake is sending reset emails through the same stream as marketing email. Marketing email accumulates spam complaints over time, and Knock’s guide notes that domain reputation “can be damaged by” causes including “Spam complaints.” If your reset emails share that reputation, they inherit its problems. Our recommendation is to keep password resets on a dedicated transactional email channel with its own subdomain (for example auth.yourdomain.com), separate from marketing sends.

Beyond infrastructure, Knock’s guide names the most common causes of reset email failure. Its own wording: “Your domain’s SPF, DKIM, or DMARC records are missing or incorrect,” and “If any of these fail, your message goes straight to spam or gets rejected.” If your emails are going to spam, audit authentication, sender address, and domain reputation first, before investigating the reset flow itself.

Format matters too. When you build HTML email, ship a plain-text alternative with it, and do so for every reset email.

Frequently Asked Questions

How long should a password reset link be valid?

OWASP says reset tokens should “expire after an appropriate period” and gives no number. For most B2B SaaS products, 15 to 30 minutes works: it limits how long a leaked or forwarded link is usable while leaving time for users on mobile or switching devices. Consumer apps with less sensitive data sometimes allow up to an hour.

Why didn’t I receive the password reset email?

The usual causes are: the message landed in spam because of missing SPF, DKIM, or DMARC authentication; the address does not match any account (most apps show the same response either way, to prevent account enumeration); or the sending domain shares a reputation with marketing email. Check the spam folder first, then confirm the address you entered.

Should I store the raw reset token or a hash of it?

Store a hash. OWASP asks that tokens be stored “in a secure manner”, and hashing with SHA-256 is the common way to meet that: a database leak then exposes hashes, not usable links. Keep the hash with the user ID and expiry, and hash the incoming token on every validation. The raw token exists only in the email link.

Why do password reset emails go to spam?

The common reasons are shared sending infrastructure with marketing email, missing SPF, DKIM, or DMARC authentication, a no-reply sender address, and promotional content in the reset message. Moving resets to a dedicated sending subdomain with proper authentication, a real From name, and a functional-only message fixes most spam placement problems.

Should the password reset flow tell users if their email address is registered?

No. OWASP says to “Return a consistent message for both existent and non-existent accounts.” Revealing whether an email is registered lets attackers enumerate valid accounts before targeted phishing or credential stuffing. Show the same “if an account exists, you’ll receive an email” message, and keep response times consistent too.

Can I reuse a password reset token if the user requests a second reset?

No. Each new request should generate a new token and invalidate any earlier unexpired one for that account. Reusing tokens leaves an intercepted link valid after a successful reset. Also delete every outstanding token for the user when the new password is saved.

When should the reset token be consumed: when the link opens or when the password is saved?

When the password is saved. Email security scanners often fetch links before the user sees them, so consuming on the first GET request can burn the token early. Validate the token when the link opens, show the form, and consume it only after a successful password submission.

Should users be logged in automatically after resetting their password?

No. OWASP says: “Don’t automatically log the user in, as this introduces additional complexity.” Redirect to the normal login page so the usual checks, including any second factor, still apply. Then send a “password changed” email so the account owner knows the reset happened.