Skip to content
Templates

Password reset email templates: HTML, plain text, and implementation notes

Start with a usable template and avoid the common gaps between copy, links, and account security.

THE SHORT ANSWER

A password reset email should identify the app, explain the requested action, offer one clear reset link, state the actual expiry, and explain what to do if the recipient did not request it. The template presents the flow; the server must enforce it.

Before you start #

For
Developers connecting reset-email copy to an account recovery flow.
Bring
Your real token lifetime, approved reset origin and session policy. Downloads need no account.
Scope
An email template cannot implement token validation or account recovery by itself.

Start with the template, then match your actual behavior #

Our password reset template includes a descriptive subject, a visible button, a plain-text fallback URL, and a concise explanation for an unexpected request. Download both HTML and text versions without an account. The preview uses synthetic details.

Replace the application name, reset URL, expiry description, and support contact. Do not ship a claim that a link expires in 30 minutes if your backend uses a different duration. Do not say that a password has changed when this email only offers a reset.

Preview and download the password reset template →

Make the subject and first sentence do the work #

Keep promotional content out of this flow. A person trying to recover access needs one decision. A receipt, release announcement, and reset request have different jobs; combining them makes the important action harder to find.

Relative expiry copy needs a clear starting point. “Expires 30 minutes after you requested it” is more precise than implying 30 minutes remain when a delayed message is opened. If you show an exact expiry, include the time zone and derive it from the server record. Use the same value in HTML and plain text; the server still decides whether the token is valid.

ElementSuggested copyWhy it helps
SubjectReset your {{app_name}} passwordNames the action and the app without invented urgency.
OpeningWe received a request to reset your password.Explains why the message exists.
ButtonReset passwordDescribes the destination instead of “Click here.”
ExpiryThis link expires in {{expiry_minutes}} minutes.Sets an expectation tied to the real token lifetime.
Unexpected requestIf you did not request this, you can ignore this email.Avoids asking an uninvolved person to act.

The server owns the security properties #

Use cryptographically random, single-use tokens with a bounded lifetime. Store tokens securely and validate them on the server. Return a consistent reset-request response whether or not an account exists, and apply abuse controls to the request endpoint.

Construct reset URLs from a trusted configured origin, not an arbitrary Host header. Complete the change only after the user submits the reset form. A link scanner may visit the URL before the person does, so merely opening a link should not change the password or consume the reset action.

Keep tokens out of analytics URLs, application logs, and third-party page assets. Decide how existing sessions are handled after a successful reset and communicate that behavior accurately. These controls belong in the account system; changing an email template does not implement them.

A practical token record can contain an account reference, a digest of a high-entropy random token, an expiry, and a consumed timestamp. At completion, check validity and change the password in the same transaction that consumes the token. Two simultaneous submissions must not both succeed. This is an implementation pattern to review with your authentication design, not a complete authentication service.

Use Referrer-Policy: no-referrer on the reset page. Disable email click-tracking rewrites for secret-bearing reset links, and exclude their query strings from access logs and analytics. Validate the parsed URL’s scheme, origin and intended path before rendering it; a string that merely contains your domain is not an allowlist check.

Test races and information leaks outside the template #

“Single use” must survive two requests arriving together. A read-then-write check in application code is not enough: both handlers can observe an unused token. Enforce consumption and the password change in one transaction with a conditional update or lock, and check that exactly one valid token was consumed before committing.

Also test whether your reset-request endpoint leaks account existence through timing, status codes or response size. Identical copy alone does not hide a fast “unknown account” branch. Queue the work consistently, apply abuse controls, and measure the two paths under comparable load.

Concurrent or delayed actionInvariant to assert
Two completions use the same valid tokenOne password change commits; the other request cannot consume the token.
A user requests token B while token A’s email is queuedThe documented older-token policy decides whether A remains usable; email arrival order does not.
A scanner follows the link before the userGET can show the form, but neither consumes the token nor changes the password.
The password transaction rolls backToken consumption rolls back too; no success notification claims a completed reset.

OWASP: consistent responses and single-use recovery tokens →

Design for the email that actually reaches the reader #

A conservative table layout and inline styles make a useful starting point. Use readable body text, sufficient contrast, meaningful link text, and a comfortable touch target. Keep essential instructions in text so they remain visible when images do not load.

Include the same action and expiry information in the plain-text version. Test long app names, unusually long URLs, localization, narrow screens, and a reader with images disabled. A layout that looks good with “Acme” can break with a real organization name.

The library previews are browser previews. They are not a claim of coverage across Outlook, Gmail, Apple Mail, or every dark-mode implementation. Test the final rendered message in the clients your users actually use.

Treat delayed delivery as part of the reset experience #

A reset email arriving after its link expires creates a frustrating loop. Track queue age separately from server acceptance and decide what the application should show when a previous request is still pending.

For a new user-requested reset, define whether previous tokens remain valid or are invalidated. Reusing a delivery idempotency key for a genuinely new reset request can suppress the new message; generating a new key for a network retry can duplicate the old one. Use the reset request’s own stable ID.

When a user reports a missing reset, collect the specific request time and message identifier rather than asking them to request repeatedly. The delivery troubleshooting guide shows how to work through the handoffs.

Trace a reset email that has not arrived →

Before putting the template into production #

  1. Render with realistic long values and verify no unresolved placeholders remain.
  2. Check that the URL uses your approved HTTPS origin and includes only the intended token.
  3. Confirm one successful reset, an expired token, a reused token, and an unsolicited request.
  4. Inspect HTML and plain text; verify that both describe the same action.
  5. Run a controlled delivery check and record authentication results without exposing the token.

Browse verification, receipt, and notification templates →

Test the flow without sending real mail →

Use an acceptance test for the whole reset journey #

The template’s expiry sentence is a promise your account service must enforce. Treat the HTML, text version, token lifetime, and completion page as one flow. Preview all of them with synthetic data before connecting a live transport.

ScenarioExpected result
Unknown account requests a resetThe public response does not disclose whether the account exists.
A mailbox scanner opens the linkOpening the page alone does not change the password.
The token is expired or already usedThe password remains unchanged and the page offers a new request.
The user completes a valid resetThe server changes the password once and follows your session invalidation policy.
A template renders an unexpected valueEscaping and URL validation prevent injected markup or an unapproved destination.

Download the refreshed password reset template →

Sources and further reading

Written for Stampwing with AI assistance and checked against the linked documentation. Examples are educational; simulated results are labelled. How these resources are maintained.