Free email template
Magic link sign-in email template
A ready-to-use magic link (passwordless sign-in) email template with subject lines, security copy and responsive HTML. Copy it, swap in your brand and variables, and send.
Last reviewed November 2026
Your sign-in link for Acme · This link expires in 15 minutes and can be used once.
magic-link.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>Your sign-in link for Acme</title>
</head>
<body style="margin:0;padding:0;background:#f4f4f5;">
<div style="display:none;max-height:0;overflow:hidden;opacity:0;">This link expires in 15 minutes and can be used once.</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;">Sign in to Acme</h1>
<p style="margin:0 0 16px;font-size:16px;line-height:24px;color:#3f3f46;">Click the button below to sign in. This link expires in 15 minutes and can only be used once.</p>
<table role="presentation" cellspacing="0" cellpadding="0" border="0" style="margin:8px 0 24px;"><tr><td style="border-radius:8px;background:#18181b;"><a href="https://acme.com/auth/callback?token={{token}}" style="display:inline-block;padding:12px 24px;font-size:15px;font-weight:600;color:#ffffff;text-decoration:none;border-radius:8px;">Sign in</a></td></tr></table>
<p style="margin:0 0 16px;font-size:16px;line-height:24px;color:#3f3f46;">If you didn't try to sign in, you can ignore this email. Someone may have typed your address by mistake.</p>
</td></tr>
<tr><td style="padding:16px 32px 32px;border-top:1px solid #f4f4f5;font-size:13px;line-height:20px;color:#a1a1aa;">Requested from {{location}} at {{time}}.<br>Acme Inc., 123 Market St, San Francisco, CA</td></tr>
</table>
</td></tr>
</table>
</body>
</html>Subject line ideas
- Your sign-in link for Acme
- Sign in to Acme
- Here's your login link
Preheader: This link expires in 15 minutes and can be used once.
Best practices
- Use short expiry (10 to 15 minutes) and single-use tokens.
- Include where and when the request came from.
- Deliverability is everything here: send from a warm, authenticated transactional subdomain.
Variables used
{{token}}, {{location}}, {{time}}
Plain-text version
Always send a text part alongside HTML. It helps deliverability and accessibility.
Sign in to Acme
Click the button below to sign in. This link expires in 15 minutes and can only be used once.
Sign in: https://acme.com/auth/callback?token={{token}}
If you didn't try to sign in, you can ignore this email. Someone may have typed your address by mistake.
--
Requested from {{location}} at {{time}}.
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": "Your sign-in link for Acme",
"html": "<!-- the HTML above, with variables filled in -->",
"text": "<!-- the plain-text version -->",
"tags": [{ "name": "template", "value": "magic-link" }]
}'