Password reset email
Password reset with expiry, request details and a clear didn't-request-this path.
13.2 KB · Gmail-safe
Code
import * as React from "react";
import { Btn, Divider, Eyebrow, Fallback, H1, KV, P, Shell, Small, type TemplateProps } from "../components";
export type PasswordResetProps = TemplateProps & {
firstName?: string;
resetUrl?: string;
expiresInMinutes?: number;
device?: string;
location?: string;
};
export default function PasswordReset({
style,
brand,
firstName = "Maya",
resetUrl = "https://fieldnote.app/reset-password?token=c41e9b77a0",
expiresInMinutes = 60,
device = "Chrome on macOS",
location = "Lisbon, Portugal",
}: PasswordResetProps) {
return (
<Shell style={style} brand={brand} label="Security" preview={`Use this link within ${expiresInMinutes} minutes to choose a new password.`}>
<Eyebrow>Password reset</Eyebrow>
<H1>Reset your password</H1>
<P>Hi {firstName}, we received a request to reset the password for your account. Choose a new one below.</P>
<Btn href={resetUrl}>Choose a new password</Btn>
<Small>For your security this link expires in {expiresInMinutes} minutes and works once.</Small>
<KV
rows={[
["Requested from", device],
["Approximate location", location],
]}
/>
<P>
<strong>Didn't ask for this?</strong> Ignore this email — your password won't change. If you keep getting these,
reply and we'll look into it.
</P>
<Divider my={16} />
<Fallback href={resetUrl} />
</Shell>
);
}
PasswordReset.PreviewProps = {} satisfies PasswordResetProps;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html dir="ltr" lang="en"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/><meta name="x-apple-disable-message-reformatting"/><meta name="color-scheme" content="light dark"/><meta name="supported-color-schemes" content="light dark"/><meta name="x-apple-disable-message-reformatting"/><meta name="format-detection" content="telephone=no,address=no,email=no,date=no,url=no"/><style>:root{color-scheme:light dark;supported-color-schemes:light dark}
body{margin:0;padding:0;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}
img{border:0;outline:none;text-decoration:none;-ms-interpolation-mode:bicubic}
a{text-decoration:none}
.mb-logo-dark{display:none;max-height:0;overflow:hidden}
@media only screen and (max-width:620px){
.mb-pad{padding-left:24px !important;padding-right:24px !important}
.mb-outer{padding-left:12px !important;padding-right:12px !important}
.mb-h1{font-size:24px !important;line-height:1.2 !important}
.mb-stack{display:block !important;width:100% !important;box-sizing:border-box}
.mb-stack-gap{padding-top:12px !important;padding-left:0 !important;padding-right:0 !important}
.mb-hide-mobile{display:none !important}
.mb-full{width:100% !important;display:block !important}
}
@media (prefers-color-scheme: dark){
.mb-page{background-color:#0D0E11 !important}
.mb-card{background-color:#17181C !important;border-color:#2C2F36 !important}
.mb-subtle{background-color:#1F2126 !important;border-color:#2C2F36 !important}
.mb-border{border-color:#2C2F36 !important}
.mb-heading{color:#F4F5F7 !important}
.mb-text{color:#D5D8DE !important}
.mb-muted{color:#959AA4 !important}
.mb-ink{background-color:#F4F5F7 !important;color:#0D0E11 !important}
.mb-logo-light{display:none !important;max-height:0 !important}
.mb-logo-dark{display:block !important;max-height:none !important}
}
[data-ogsb] .mb-page{background-color:#0D0E11 !important}
[data-ogsb] .mb-card{background-color:#17181C !important}
[data-ogsb] .mb-subtle{background-color:#1F2126 !important}
[data-ogsc] .mb-heading{color:#F4F5F7 !important}
[data-ogsc] .mb-text{color:#D5D8DE !important}
[data-ogsc] .mb-muted{color:#959AA4 !important}</style></head><body class="mb-page" style="background-color:#F2F3F5;margin:0;padding:0;width:100%"><!--$--><!--html--><!--head--><!--body--><div style="display:none;overflow:hidden;line-height:1px;opacity:0;max-height:0;max-width:0" data-skip-in-text="true">Use this link within 60 minutes to choose a new password.<div> </div></div><table role="presentation" width="100%" cellPadding="0" cellSpacing="0" class="mb-page" style="width:100%;background-color:#F2F3F5;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif"><tbody><tr><td align="center" class="mb-outer" style="padding:32px 16px 48px"><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" style="max-width:600px;width:100%"><tbody><tr style="width:100%"><td><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" style="padding:8px 8px 24px"><tbody><tr><td><img class="mb-logo-light" alt="Fieldnote" height="32" src="https://getmailblocks.com/brand/fieldnote-logo.png" style="display:block;outline:none;border:none;text-decoration:none" width="132"/><div class="mb-logo-dark" style="display:none;max-height:0;overflow:hidden;mso-hide:all"><img alt="Fieldnote" height="32" src="https://getmailblocks.com/brand/fieldnote-logo-dark.png" style="display:block;outline:none;border:none;text-decoration:none" width="132"/></div></td></tr></tbody></table><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" class="mb-card" style="background-color:#FFFFFF;border:1px solid #E4E6EA;border-radius:14px"><tbody><tr><td><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation"><tbody style="width:100%"><tr style="width:100%"><td class="mb-pad" data-id="__react-email-column" style="padding:40px 44px 40px"><p style="font-size:12px;line-height:16px;margin:0 0 12px;font-weight:600;letter-spacing:0;text-transform:none;color:#3B5BFD;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;margin-top:0;margin-right:0;margin-bottom:12px;margin-left:0">Password reset</p><p class="mb-heading mb-h1" style="font-size:26px;line-height:1.25;margin:0 0 16px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;font-weight:650;letter-spacing:-0.02em;color:#0F1115;margin-top:0;margin-right:0;margin-bottom:16px;margin-left:0">Reset your password</p><p class="mb-text" style="font-size:15px;line-height:24px;margin:0 0 16px;color:#30343B;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;margin-top:0;margin-right:0;margin-bottom:16px;margin-left:0">Hi <!-- -->Maya<!-- -->, we received a request to reset the password for your account. Choose a new one below.</p><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" style="margin:8px 0 24px"><tbody><tr><td><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation"><tbody style="width:100%"><tr style="width:100%"><td align="left" data-id="__react-email-column"><a href="https://fieldnote.app/reset-password?token=c41e9b77a0" style="line-height:20px;text-decoration:none;display:inline-block;max-width:100%;mso-padding-alt:0px;background-color:#3B5BFD;color:#FFFFFF;border:1px solid #3B5BFD;border-radius:8px;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:15px;font-weight:600;padding:12px 22px;letter-spacing:0;text-align:center;box-sizing:border-box;padding-top:12px;padding-right:22px;padding-bottom:12px;padding-left:22px" target="_blank"><span><!--[if mso]><i style="mso-font-width:366.66666666666663%;mso-text-raise:18" hidden>   </i><![endif]--></span><span style="max-width:100%;display:inline-block;line-height:120%;mso-padding-alt:0px;mso-text-raise:9px">Choose a new password</span><span><!--[if mso]><i style="mso-font-width:366.66666666666663%" hidden>   ​</i><![endif]--></span></a></td></tr></tbody></table></td></tr></tbody></table><p class="mb-muted" style="font-size:13px;line-height:20px;margin:0 0 12px;color:#6B7079;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;margin-top:0;margin-right:0;margin-bottom:12px;margin-left:0">For your security this link expires in <!-- -->60<!-- --> minutes and works once.</p><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" style="margin:0 0 24px"><tbody><tr><td><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation"><tbody style="width:100%"><tr style="width:100%"><td class="mb-muted mb-border mb-k" data-id="__react-email-column" style="width:38%;padding:10px 0;font-size:13px;line-height:20px;color:#6B7079;vertical-align:top;border-top:none;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif">Requested from</td><td class="mb-heading mb-border" data-id="__react-email-column" style="padding:10px 0;font-size:14px;line-height:20px;color:#0F1115;vertical-align:top;border-top:none;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif">Chrome on macOS</td></tr></tbody></table><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation"><tbody style="width:100%"><tr style="width:100%"><td class="mb-muted mb-border mb-k" data-id="__react-email-column" style="width:38%;padding:10px 0;font-size:13px;line-height:20px;color:#6B7079;vertical-align:top;border-top:1px solid #E4E6EA;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif">Approximate location</td><td class="mb-heading mb-border" data-id="__react-email-column" style="padding:10px 0;font-size:14px;line-height:20px;color:#0F1115;vertical-align:top;border-top:1px solid #E4E6EA;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif">Lisbon, Portugal</td></tr></tbody></table></td></tr></tbody></table><p class="mb-text" style="font-size:15px;line-height:24px;margin:0 0 16px;color:#30343B;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;margin-top:0;margin-right:0;margin-bottom:16px;margin-left:0"><strong>Didn't ask for this?</strong> Ignore this email — your password won't change. If you keep getting these, reply and we'll look into it.</p><hr class="mb-border" style="width:100%;border:none;border-top:1px solid #eaeaea;border-color:#E4E6EA;border-top-width:1px;margin:16px 0"/><p class="mb-muted" style="font-size:13px;line-height:20px;margin:0 0 12px;color:#6B7079;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;margin-top:0;margin-right:0;margin-bottom:12px;margin-left:0">Button not working? Paste this link into your browser:<br/><a href="https://fieldnote.app/reset-password?token=c41e9b77a0" class="mb-muted" style="color:#6B7079;text-decoration-line:none;text-decoration:underline;word-break:break-all" target="_blank">https://fieldnote.app/reset-password?token=c41e9b77a0</a></p></td></tr></tbody></table></td></tr></tbody></table><table align="center" width="100%" border="0" cellPadding="0" cellSpacing="0" role="presentation" style="padding:28px 8px 0"><tbody><tr><td><p class="mb-muted" style="font-size:12px;line-height:18px;margin:0 0 6px;color:#6B7079;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;margin-top:0;margin-right:0;margin-bottom:6px;margin-left:0">You're receiving this email because you have a Fieldnote account.</p><p class="mb-muted" style="font-size:12px;line-height:18px;margin:0 0 6px;color:#6B7079;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;margin-top:0;margin-right:0;margin-bottom:6px;margin-left:0">Fieldnote Inc. · 548 Market St #4120 · San Francisco, CA 94104</p><p class="mb-muted" style="font-size:12px;line-height:18px;margin:12px 0 0;color:#6B7079;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;margin-top:12px;margin-right:0;margin-bottom:0;margin-left:0"><a href="https://x.com/fieldnote" class="mb-muted" style="color:#6B7079;text-decoration-line:none;text-decoration:underline" target="_blank">X</a> · <a href="https://linkedin.com/company/fieldnote" class="mb-muted" style="color:#6B7079;text-decoration-line:none;text-decoration:underline" target="_blank">LinkedIn</a> · <a href="https://github.com/fieldnote" class="mb-muted" style="color:#6B7079;text-decoration-line:none;text-decoration:underline" target="_blank">GitHub</a></p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table><!--/$--></body></html>Password reset
Reset your password
Hi Maya, we received a request to reset the password for your account. Choose
a new one below.
Choose a new password (https://fieldnote.app/reset-password?token=c41e9b77a0)
For your security this link expires in 60 minutes and works once.
Requested from: Chrome on macOS
Approximate location: Lisbon, Portugal
Didn't ask for this? Ignore this email — your password won't change. If you
keep getting these, reply and we'll look into it.
------------------------------------------------------------------------------
Button not working? Paste this link into your browser:
https://fieldnote.app/reset-password?token=c41e9b77a0
You're receiving this email because you have a Fieldnote account.
Fieldnote Inc. · 548 Market St #4120 · San Francisco, CA 94104
X (https://x.com/fieldnote) · LinkedIn
(https://linkedin.com/company/fieldnote) · GitHub
(https://github.com/fieldnote)
The TSX imports components.tsx and theme.ts from the kit. Grab the free starter (all six free templates with their components) on the free page.
Related
Magic link
№15 · SecurityPasswordless sign-in link with a backup code, in the style of Linear and Vercel.
Two-factor code
№16 · SecurityOne-time passcode email with a big, selectable code and expiry.
New sign-in alert
№17 · SecuritySecurity alert with device, location, IP and time, plus a secure-my-account action.
Password changed
№18 · SecurityConfirmation that a password changed, with an urgent path if it wasn't the user.