Free email template
Verification code (OTP) email template
A ready-to-use one-time password (OTP) and verification code email template with subject lines and responsive HTML. Copy it, swap in your brand and variables, and send.
Last reviewed November 2026
{{code}} is your Acme verification code · Enter this code to continue. It expires in 10 minutes.
verification-code.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="x-apple-disable-message-reformatting">
<title>{{code}} is your Acme verification code</title>
</head>
<body style="margin:0;padding:0;background:#f4f4f5;">
<div style="display:none;max-height:0;overflow:hidden;opacity:0;">Enter this code to continue. It expires in 10 minutes.</div>
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" style="background:#f4f4f5;">
<tr><td align="center" style="padding:32px 16px;">
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" border="0" style="max-width:560px;background:#ffffff;border-radius:12px;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;">
<tr><td style="padding:32px 32px 0;font-size:18px;font-weight:700;color:#18181b;">Acme</td></tr>
<tr><td style="padding:24px 32px 8px;">
<h1 style="margin:0 0 16px;font-size:22px;line-height:30px;color:#18181b;">Your verification code</h1>
<p style="margin:0 0 16px;font-size:16px;line-height:24px;color:#3f3f46;">Enter this code to continue signing in. It expires in 10 minutes.</p>
<p style="margin:8px 0 24px;font-family:'SFMono-Regular',Menlo,Consolas,monospace;font-size:32px;letter-spacing:8px;font-weight:700;color:#18181b;">482 913</p>
<p style="margin:0 0 16px;font-size:16px;line-height:24px;color:#3f3f46;">If you didn't request this code, someone may be trying to access your account. You can ignore this email; we won't sign anyone in without the code.</p>
</td></tr>
<tr><td style="padding:16px 32px 32px;border-top:1px solid #f4f4f5;font-size:13px;line-height:20px;color:#a1a1aa;">Never share this code with anyone, including Acme staff.<br>Acme Inc., 123 Market St, San Francisco, CA</td></tr>
</table>
</td></tr>
</table>
</body>
</html>Subject line ideas
- {{code}} is your Acme verification code
- Your Acme login code: {{code}}
- Your verification code
Preheader: Enter this code to continue. It expires in 10 minutes.
Best practices
- Put the code in the subject line so it shows in notifications.
- Expire codes after 10 minutes and limit attempts.
- Avoid links in OTP emails; they look like phishing.
Variables used
{{code}}
Plain-text version
Always send a text part alongside HTML. It helps deliverability and accessibility.
Your verification code
Enter this code to continue signing in. It expires in 10 minutes.
482 913
If you didn't request this code, someone may be trying to access your account. You can ignore this email; we won't sign anyone in without the code.
--
Never share this code with anyone, including Acme staff.
Send it with the API
POST /v1/emails
curl -X POST https://stackemails.com/v1/emails -H "Authorization: Bearer $STACKEMAILS_API_KEY" -H "Content-Type: application/json" -d '{
"from": "Acme <hello@mail.acme.com>",
"to": "ada@example.com",
"subject": "{{code}} is your Acme verification code",
"html": "<!-- the HTML above, with variables filled in -->",
"text": "<!-- the plain-text version -->",
"tags": [{ "name": "template", "value": "verification-code" }]
}'