Black Friday is here 🔥 Get Wensity Pro for 20% less with

OTP email template

Pro

A one-time code email: six digits, one per box, with the expiry and a plain warning never to share it.

Overview

For two-factor and code-based sign-in, the digits are the email. This template sets each digit in its own box with a gap after the third, which makes a code easier to read and to type on a phone, and puts the expiry and the one-device rule in a single muted line beneath. A soft panel at the end says the company will never ask for the code and links to account security. The code is a prop, so it works with whatever generates your verification codes, and the boxes shrink on narrow screens.

This template is part of the 65 React Email templates that come with Wensity Pro. Each one is a single file built from React Email components, with a kit for your brand, and installs with the Wensity CLI or the MCP server.

Installation

Run the following command

~/your-project
pnpm dlx wensity@latest emails add ledger/one-time-code

The email lands in emails/ledger/ next to the style's kit.tsx, where you set your brand, colours and links once. It needs Wensity Pro and npx wensity@latest login.

Usage

Render the email to HTML with render() from React Email, then send it with Resend, Nodemailer, AWS SES or any provider. The data that changes per send is a typed prop.

send.tsx
import { render } from "react-email";
import Email from "@/emails/ledger/one-time-code";
const html = await render(<Email {...props} />);

Frequently asked questions

This template says the code expires in 10 minutes and works once, on the device that asked for it. Short lifetimes are normal for one-time codes. If your codes last longer or shorter, change that line so the email tells the truth.

One digit per box, with a gap after the third, makes a code easier to read and to type on a phone, which is where most codes are entered. The boxes shrink on narrow screens so all six fit.

Yes. The code is a prop, so the same template works for email 2FA, sign-in codes and verification codes from any generator. The inbox preview text includes the code, so many mail apps show it before the email is even opened.

Parth

Founder, Wensity

Still have a question?

Ask about plans, licensing, or templates and you will hear back from me directly.

Email hey@wensity.com

More email templates

All 65 templates
  • New sign-in alert email template in the Ledger style

    New sign-in alert

    Ledger

    A new sign-in alert that asks one question: was this you?

  • Team invitation email template in the Grove style

    Team invitation

    3 styles

    Invites that say who asked and what you will see once you join.

  • Trial ending email template in the Ledger style

    Trial ending

    Ledger

    A trial countdown with what stays and what stops.