Learn how to send Better Auth transactional emails through Resend using email hooks.
Better Auth is a framework-agnostic authentication library for TypeScript. It relies on transactional email for password resets, email verification, magic links, and one-time codes, all of which you can deliver with Resend.
The hook examples below call void resend.emails.send(...) instead of
awaiting it, as Better Auth
recommends, so the response time
doesn’t reveal whether an account exists. On serverless platforms, wrap the
send in waitUntil (or your platform’s equivalent) so the function doesn’t
terminate before the email is sent.
Better Auth calls your sendResetPassword and sendVerificationEmail hooks when a user requests a reset or needs to confirm their address. Send the email with Resend inside each hook.
auth.ts
import { betterAuth } from 'better-auth';import { Resend } from 'resend';const resend = new Resend(process.env.RESEND_API_KEY);export const auth = betterAuth({ emailAndPassword: { enabled: true, sendResetPassword: ({ user, url }) => { void resend.emails.send({ from: 'Acme <onboarding@example.com>', to: user.email, subject: 'Reset your password', html: `Click <a href="${url}">here</a> to reset your password.`, }); }, }, emailVerification: { sendVerificationEmail: ({ user, url }) => { void resend.emails.send({ from: 'Acme <onboarding@example.com>', to: user.email, subject: 'Verify your email address', html: `Click <a href="${url}">here</a> to verify your email.`, }); }, },});
The email OTP plugin sends a one-time password (OTP), a numeric code, instead of a link. The type argument tells you which flow triggered the request so you can tailor the subject line.
auth.ts
import { betterAuth } from 'better-auth';import { emailOTP } from 'better-auth/plugins';import { Resend } from 'resend';const resend = new Resend(process.env.RESEND_API_KEY);export const auth = betterAuth({ plugins: [ emailOTP({ sendVerificationOTP: ({ email, otp, type }) => { void resend.emails.send({ from: 'Acme <onboarding@example.com>', to: email, subject: type === 'sign-in' ? 'Your sign-in code' : 'Your verification code', html: `Your code is <strong>${otp}</strong>.`, }); }, }), ],});
For richer, reusable emails, author your templates with React Email and pass the rendered component to Resend’s react field, or reference a Resend template by id.
auth.ts
import { ResetPasswordEmail } from './emails/reset-password';sendResetPassword: ({ user, url }) => { void resend.emails.send({ from: 'Acme <onboarding@example.com>', to: user.email, subject: 'Reset your password', react: ResetPasswordEmail({ url }), });},
When a flow doesn’t behave as expected, check both sides:
Better Auth logs show the hook invocation and any errors thrown while sending.
Resend Logs show the delivery side: accepted, delivered, opened, bounced.
Together, you get end-to-end visibility across the entire delivery chain.
Was this page helpful?
⌘I
{"docsConfig":{"theme":"almond","$schema":"https://mintlify.com/docs.json","name":"Resend","description":"Resend is the email API for developers. The documentation covers the REST API, official SDKs, the CLI, the MCP server, webhooks, deliverability guides, and step-by-step quickstarts for every major language and framework.","colors":{"primary":"#000000","light":"#EBECED","dark":"#0A0C10"},"logo":{"light":"https://mintcdn.com/resend/w4S5Jr48MiquhhSH/logo-black.svg?fit=max\u0026auto=format\u0026n=w4S5Jr48MiquhhSH\u0026q=85\u0026s=630be7deea6ea94cc7fc4560ea60a5ac","dark":"https://mintcdn.com/resend/w4S5Jr48MiquhhSH/logo-white.svg?fit=max\u0026auto=format\u0026n=w4S5Jr48MiquhhSH\u0026q=85\u0026s=3843916235739ffb9cb1d24683221341","href":"https://resend.com"},"favicon":"https://mintcdn.com/resend/ABWmVTZIHGIFNTFD/favicon.png?fit=max\u0026auto=format\u0026n=ABWmVTZIHGIFNTFD\u0026q=85\u0026s=cdbec1c9eedb30488e99d94d84999c24","api":{"playground":{"display":"simple"},"mdx":{"auth":{"method":"bearer"},"server":"https://api.resend.com"}},"background":{"color":{"dark":"#000000"}},"navbar":{"links":[{"href":"https://resend.com/login","label":"Sign In"}],"primary":{"type":"button","label":"Get Started","href":"https://resend.com/signup"}},"footer":{"socials":{"x":"https://x.com/resend","github":"https://github.com/resend","youtube":"https://www.youtube.com/@resendlabs","website":"https://resend.com/"}},"seo":{"indexing":"all"},"fonts":{"heading":{"family":"Inter","weight":700},"body":{"family":"Inter","weight":400}},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":{"light":"github-light","dark":"vesper"}},"latex":false},"integrations":{"posthog":{"apiKey":"phc_AgEBpcQTRsBl3UgQX2U8XvimTlgdXG6YEhfvJl2cUfc","sessionRecording":false}},"contextual":{"options":["copy",{"title":"llms-full.txt","description":"View all docs as Markdown for LLMs","icon":"markdown","href":"https://resend.com/docs/llms-full.txt"},"add-mcp","cursor","vscode"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"resend","hasAudioNarration":false,"actualSubdomain":"resend","customDomains":["resend.com","resend-staging.com"],"gitSource":{"type":"github","owner":"resend","repo":"resend-docs","deployBranch":"main","contentDirectory":"","mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae3482a7704dba3b3b11803","collectionId":"791eeee3-9fff-4c15-98b8-9d34ae1519e4","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae3482a7704dba3b3b11803"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae3482a7704dba3b3b11803","clientVersion":"0.0.4006","searchFilterCounts":[{"language":"default","tag":"Documentation","count":178},{"language":"default","tag":"API Reference","count":150},{"language":"default","tag":"Learn","count":115},{"language":"default","tag":"Guides","count":95},{"language":"default","tag":"Get started","count":57},{"language":"default","tag":"Webhooks","count":54},{"language":"default","tag":"Sending examples","count":52},{"language":"default","tag":"Domains","count":38},{"language":"default","tag":"Events reference","count":37},{"language":"default","tag":"Sending","count":32}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"html:not(.dark) ::selection{background-color:#0000001a}html.dark ::selection{background-color:#ffffff33}html:not(.dark) .codeblock-light .line-highlight,html:not(.dark) .codeblock-light .line-highlight:after,html:not(.dark) .codeblock-light .line-highlight:before{background:#00cc9937}html.dark .line-highlight,html.dark .line-highlight:after,html.dark .line-highlight:before,html:not(.dark) .codeblock-dark .line-highlight,html:not(.dark) .codeblock-dark .line-highlight:after,html:not(.dark) .codeblock-dark .line-highlight:before{background:#00fff61d}html.dark .line-highlight:before,html:not(.dark) .codeblock-dark .line-highlight:before{border-color:#4cd7b8}html:not(.dark) .codeblock-light .line-highlight:before{border-color:#55d799}#page-context-menu-button{padding-block:8px}.nav-logo{width:80px}@media (min-width:1024px){#navbar .flex-1:has(>a .nav-logo){flex:none!important;width:15rem}#navbar .ustify-end:has(.nav-tabs){justify-content:space-between!important;margin-left:0!important}#navbar .flex:has(>.ustify-end){flex:1!important}#navbar .nav-tabs{white-space:nowrap}}"}],"page":{"pagePath":"send-with-better-auth","slug":"/send-with-better-auth","pageMetadata":{"title":"Send Better Auth emails with Resend","sidebarTitle":"Better Auth","description":"Learn how to send Better Auth transactional emails through Resend using email hooks.","reviewed":"2026-07-22T00:00:00.000Z","href":"/send-with-better-auth"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Learn how to send Better Auth transactional emails through Resend using email hooks.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Info,Note}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://better-auth.com`,children:`Better Auth`}),` is a framework-agnostic authentication library for TypeScript. It relies on transactional email for password resets, email verification, magic links, and one-time codes, all of which you can deliver with Resend.`]}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsx(_components.p,{children:`Before you start, you’ll need:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A Resend `,_jsx(_components.a,{href:`/create-an-api-key`,children:`API key`})]}),`\n`,_jsxs(_components.li,{children:[`A `,_jsx(_components.a,{href:`/add-a-domain`,children:`verified domain`})]}),`\n`,_jsxs(_components.li,{children:[`A project with `,_jsx(_components.a,{href:`https://better-auth.com/docs/installation`,children:`Better Auth installed`})]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`install-the-resend-sdk`,children:`Install the Resend SDK`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`npm`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light vesper`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#101010`,color:`#24292e`,\"--shiki-dark\":`#FFF`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:`npm`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:` install`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:` resend`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`pnpm`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light vesper`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#101010`,color:`#24292e`,\"--shiki-dark\":`#FFF`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:`pnpm`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:` add`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:` resend`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`yarn`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light vesper`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#101010`,color:`#24292e`,\"--shiki-dark\":`#FFF`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:`yarn`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:` add`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:` resend`})]}),`\n`]})})})]}),`\n`,_jsx(_components.p,{children:`Add your API key to the environment:`}),`\n`,_jsx(CodeBlock,{filename:`.env`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light vesper`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#101010`,color:`#24292e`,\"--shiki-dark\":`#FFF`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`RESEND_API_KEY`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`=`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:`re_xxxxxxxxx`})]}),`\n`]})})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`The hook examples below call `,_jsx(_components.code,{children:`void resend.emails.send(...)`}),` instead of\nawaiting it, `,_jsx(_components.a,{href:`https://better-auth.com/docs/concepts/email`,children:`as Better Auth\nrecommends`}),`, so the response time\ndoesn’t reveal whether an account exists. On serverless platforms, wrap the\nsend in `,_jsx(_components.code,{children:`waitUntil`}),` (or your platform’s equivalent) so the function doesn’t\nterminate before the email is sent.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`send-password-reset-and-verification-emails`,children:`Send password reset and verification emails`}),`\n`,_jsxs(_components.p,{children:[`Better Auth calls your `,_jsx(_components.code,{children:`sendResetPassword`}),` and `,_jsx(_components.code,{children:`sendVerificationEmail`}),` hooks when a user requests a reset or needs to confirm their address. Send the email with Resend inside each hook.`]}),`\n`,_jsx(CodeBlock,{filename:`auth.ts`,numberOfLines:`28`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light vesper`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#101010`,color:`#24292e`,\"--shiki-dark\":`#FFF`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`28`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` { betterAuth } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:` 'better-auth'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` { Resend } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:` 'resend'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#FFF`},children:` resend`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:` new`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:` Resend`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`(process.env.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#FFF`},children:`RESEND_API_KEY`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`export`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:` const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#FFF`},children:` auth`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:` =`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:` betterAuth`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`({`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` emailAndPassword: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` enabled: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#FFC799`},children:`true`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:` sendResetPassword`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`: ({ `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFF`},children:`user`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`, `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFF`},children:`url`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` }) `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`=>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:` void`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` resend.emails.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:`send`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` from: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:`'Acme \u003conboarding@example.com>'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` to: user.email,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` subject: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:`'Reset your password'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` html: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:'`Click \u003ca href=\"${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`url`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:'}\">here\u003c/a> to reset your password.`'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` emailVerification: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:` sendVerificationEmail`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`: ({ `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFF`},children:`user`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`, `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFF`},children:`url`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` }) `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`=>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:` void`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` resend.emails.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:`send`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` from: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:`'Acme \u003conboarding@example.com>'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` to: user.email,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` subject: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:`'Verify your email address'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` html: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:'`Click \u003ca href=\"${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`url`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:'}\">here\u003c/a> to verify your email.`'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`});`})}),`\n`]})})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Set the `,_jsx(_components.code,{children:`from`}),` address to match your `,_jsx(_components.a,{href:`/add-a-domain`,children:`verified domain`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`send-magic-links-optional`,children:`Send magic links (optional)`}),`\n`,_jsxs(_components.p,{children:[`If you use the `,_jsx(_components.a,{href:`https://better-auth.com/docs/plugins/magic-link`,children:`magic link plugin`}),`, send the sign-in link through the `,_jsx(_components.code,{children:`sendMagicLink`}),` hook.`]}),`\n`,_jsx(CodeBlock,{filename:`auth.ts`,numberOfLines:`20`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light vesper`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#101010`,color:`#24292e`,\"--shiki-dark\":`#FFF`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` { betterAuth } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:` 'better-auth'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` { magicLink } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:` 'better-auth/plugins'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` { Resend } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:` 'resend'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#FFF`},children:` resend`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:` new`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:` Resend`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`(process.env.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#FFF`},children:`RESEND_API_KEY`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`export`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:` const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#FFF`},children:` auth`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:` =`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:` betterAuth`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`({`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` plugins: [`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:` magicLink`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:` sendMagicLink`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`: ({ `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFF`},children:`email`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`, `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFF`},children:`url`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` }) `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`=>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:` void`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` resend.emails.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:`send`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` from: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:`'Acme \u003conboarding@example.com>'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` to: email,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` subject: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:`'Sign in to Acme'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` html: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:'`Click \u003ca href=\"${'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`url`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:'}\">here\u003c/a> to sign in.`'}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` }),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`});`})}),`\n`]})})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Set the `,_jsx(_components.code,{children:`from`}),` address to match your `,_jsx(_components.a,{href:`/add-a-domain`,children:`verified domain`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`send-one-time-codes-optional`,children:`Send one-time codes (optional)`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.a,{href:`https://better-auth.com/docs/plugins/email-otp`,children:`email OTP plugin`}),` sends a one-time password (OTP), a numeric code, instead of a link. The `,_jsx(_components.code,{children:`type`}),` argument tells you which flow triggered the request so you can tailor the subject line.`]}),`\n`,_jsx(CodeBlock,{filename:`auth.ts`,numberOfLines:`21`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light vesper`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#101010`,color:`#24292e`,\"--shiki-dark\":`#FFF`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`21`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` { betterAuth } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:` 'better-auth'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` { emailOTP } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:` 'better-auth/plugins'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` { Resend } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:` 'resend'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#FFF`},children:` resend`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:` new`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:` Resend`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`(process.env.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#FFF`},children:`RESEND_API_KEY`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`export`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:` const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#FFF`},children:` auth`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:` =`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:` betterAuth`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`({`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` plugins: [`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:` emailOTP`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:` sendVerificationOTP`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`: ({ `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFF`},children:`email`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`, `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFF`},children:`otp`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`, `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFF`},children:`type`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` }) `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`=>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:` void`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` resend.emails.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:`send`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` from: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:`'Acme \u003conboarding@example.com>'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` to: email,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` subject:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` type `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`===`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:` 'sign-in'`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:` ?`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:` 'Your sign-in code'`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:` :`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:` 'Your verification code'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` html: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:\"`Your code is \u003cstrong>${\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`otp`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:\"}\u003c/strong>.`\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` }),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`});`})}),`\n`]})})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Set the `,_jsx(_components.code,{children:`from`}),` address to match your `,_jsx(_components.a,{href:`/add-a-domain`,children:`verified domain`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`customize-email-templates`,children:`Customize email templates`}),`\n`,_jsxs(_components.p,{children:[`For richer, reusable emails, author your templates with `,_jsx(_components.a,{href:`https://react.email`,children:`React Email`}),` and pass the rendered component to Resend’s `,_jsx(_components.code,{children:`react`}),` field, or reference a `,_jsx(_components.a,{href:`/dashboard/templates/introduction`,children:`Resend template`}),` by `,_jsx(_components.code,{children:`id`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:`auth.ts`,numberOfLines:`10`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light vesper`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#101010`,color:`#24292e`,\"--shiki-dark\":`#FFF`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` { ResetPasswordEmail } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:` './emails/reset-password'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:`sendResetPassword`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`: ({ `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFF`},children:`user`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`, `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFF`},children:`url`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` }) `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:`=>`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#A0A0A0`},children:` void`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` resend.emails.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:`send`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` from: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:`'Acme \u003conboarding@example.com>'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` to: user.email,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` subject: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#99FFE4`},children:`'Reset your password'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` react: `}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#FFC799`},children:`ResetPasswordEmail`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`({ url }),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#FFF`},children:`},`})}),`\n`]})})}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Set the `,_jsx(_components.code,{children:`from`}),` address to match your `,_jsx(_components.a,{href:`/add-a-domain`,children:`verified domain`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`debugging-email-delivery`,children:`Debugging email delivery`}),`\n`,_jsx(_components.p,{children:`When a flow doesn’t behave as expected, check both sides:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Better Auth logs`}),` show the hook invocation and any errors thrown while sending.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`https://resend.com/logs`,children:_jsx(_components.strong,{children:`Resend Logs`})}),` show the delivery side: accepted, delivered, opened, bounced.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Together, you get end-to-end visibility across the entire delivery chain.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"theme":{"light":"github-light","dark":"vesper"}},"config":{},"pageMetadata":{"title":"Send Better Auth emails with Resend","sidebarTitle":"Better Auth","description":"Learn how to send Better Auth transactional emails through Resend using email hooks.","reviewed":"2026-07-22T00:00:00.000Z","href":"/send-with-better-auth"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"Install the Resend SDK","slug":"install-the-resend-sdk","depth":2,"children":[]},{"title":"Send password reset and verification emails","slug":"send-password-reset-and-verification-emails","depth":2,"children":[]},{"title":"Send magic links (optional)","slug":"send-magic-links-optional","depth":2,"children":[]},{"title":"Send one-time codes (optional)","slug":"send-one-time-codes-optional","depth":2,"children":[]},{"title":"Customize email templates","slug":"customize-email-templates","depth":2,"children":[]},{"title":"Debugging email delivery","slug":"debugging-email-delivery","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/resend/34a103d44dce6f34/resend.js","/docs/_mintlify/custom/resend/b0fac65f85cb29e7/reo.dev.js"],"subdomain":"resend","siteName":"Resend","title":"Send Better Auth emails with Resend - Resend","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-22T13:42:11.148Z","originalFileLocation":"send-with-better-auth.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Learn how to send Better Auth transactional emails through Resend using email hooks.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Resend\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/resend/nAzNk0iRWkZBBJ91/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/resend/nAzNk0iRWkZBBJ91/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/resend/nAzNk0iRWkZBBJ91/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/resend/nAzNk0iRWkZBBJ91/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/resend/nAzNk0iRWkZBBJ91/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/resend/nAzNk0iRWkZBBJ91/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/resend/nAzNk0iRWkZBBJ91/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/resend/nAzNk0iRWkZBBJ91/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/resend/nAzNk0iRWkZBBJ91/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Send Better Auth emails with Resend - Resend\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn how to send Better Auth transactional emails through Resend using email hooks.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Resend\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://resend.com/docs/send-with-better-auth\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://resend.mintlify.app/_mintlify/api/og/v2?division=Node.js\u0026amp;title=Send+Better+Auth+emails+with+Resend\u0026amp;description=Learn+how+to+send+Better+Auth+transactional+emails+through+Resend+using+email+hooks.\u0026amp;theme=0453800a90f4a9b2ad9d73ea\u0026amp;signature=4261232b18270db55bafb5e4f5866d012d1f5b0618e3ce0040d5a2e14a05f4e6\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Send Better Auth emails with Resend - Resend\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn how to send Better Auth transactional emails through Resend using email hooks.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://resend.mintlify.app/_mintlify/api/og/v2?division=Node.js\u0026amp;title=Send+Better+Auth+emails+with+Resend\u0026amp;description=Learn+how+to+send+Better+Auth+transactional+emails+through+Resend+using+email+hooks.\u0026amp;theme=0453800a90f4a9b2ad9d73ea\u0026amp;signature=4261232b18270db55bafb5e4f5866d012d1f5b0618e3ce0040d5a2e14a05f4e6\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/resend/nAzNk0iRWkZBBJ91/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Resend\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#000000\">\u003clink data-mint-head rel=\"canonical\" href=\"https://resend.com/docs/send-with-better-auth\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/send-with-better-auth.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://resend.com/#organization\",\"name\":\"Resend\",\"url\":\"https://resend.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/resend/w4S5Jr48MiquhhSH/logo-black.svg?fit=max\u0026auto=format\u0026n=w4S5Jr48MiquhhSH\u0026q=85\u0026s=630be7deea6ea94cc7fc4560ea60a5ac\"}},{\"@type\":\"WebSite\",\"@id\":\"https://resend.com/docs#website\",\"name\":\"Resend\",\"url\":\"https://resend.com/docs\",\"publisher\":{\"@id\":\"https://resend.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://resend.com/docs/send-with-better-auth#webpage\",\"url\":\"https://resend.com/docs/send-with-better-auth\",\"name\":\"Send Better Auth emails with Resend\",\"description\":\"Learn how to send Better Auth transactional emails through Resend using email hooks.\",\"dateModified\":\"2026-07-22T13:42:11.148Z\",\"isPartOf\":{\"@id\":\"https://resend.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://resend.com/docs/send-with-better-auth#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://resend.com/docs/send-with-better-auth#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Get started\",\"item\":\"https://resend.com/docs/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sending examples\",\"item\":\"https://resend.com/docs/send-with-nodejs\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Node.js\",\"item\":\"https://resend.com/docs/send-with-nodejs\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Send Better Auth emails with Resend\",\"item\":\"https://resend.com/docs/send-with-better-auth\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://resend.com/docs/send-with-better-auth#article\",\"headline\":\"Send Better Auth emails with Resend\",\"name\":\"Send Better Auth emails with Resend\",\"description\":\"Learn how to send Better Auth transactional emails through Resend using email hooks.\",\"url\":\"https://resend.com/docs/send-with-better-auth\",\"mainEntityOfPage\":{\"@id\":\"https://resend.com/docs/send-with-better-auth#webpage\"},\"dateModified\":\"2026-07-22T13:42:11.148Z\",\"publisher\":{\"@id\":\"https://resend.com/#organization\"},\"isPartOf\":{\"@id\":\"https://resend.com/docs#website\"}}]}\u003c/script>","siteName":"Resend","nav":{"global":null,"tabs":[{"tab":"Documentation","icon":"book","groups":[{"group":"Get started","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Create an API key","sidebarTitle":"Create API key","href":"/create-an-api-key"},{"title":"Add and verify a domain","sidebarTitle":"Add domain","href":"/add-a-domain"},{"title":"Sending emails with Resend","sidebarTitle":"Email types","href":"/email-types"},{"title":"AI onboarding","sidebarTitle":"AI onboarding","href":"/ai-onboarding"},{"group":"Sending examples","pages":[{"group":"Node.js","pages":[{"title":"Send emails with Node.js","sidebarTitle":"Introduction","href":"/send-with-nodejs"},{"title":"Send emails with Next.js","sidebarTitle":"Next.js","href":"/send-with-nextjs"},{"title":"Send emails with Remix","sidebarTitle":"Remix","href":"/send-with-remix"},{"title":"Send emails with Nuxt","sidebarTitle":"Nuxt","href":"/send-with-nuxt"},{"title":"Send emails with TanStack Start","sidebarTitle":"TanStack Start","href":"/send-with-tanstack-start"},{"title":"Send emails with SvelteKit","sidebarTitle":"SvelteKit","href":"/send-with-sveltekit"},{"title":"Send emails with Express","sidebarTitle":"Express","href":"/send-with-express"},{"title":"Send emails with RedwoodJS","sidebarTitle":"RedwoodJS","href":"/send-with-redwoodjs"},{"title":"Send emails with Hono","sidebarTitle":"Hono","href":"/send-with-hono"},{"title":"Send emails with Bun","sidebarTitle":"Bun","href":"/send-with-bun"},{"title":"Send emails with Astro","sidebarTitle":"Astro","href":"/send-with-astro"},{"title":"Send emails with Railway","sidebarTitle":"Railway","href":"/send-with-railway"},{"title":"Send emails with Encore","sidebarTitle":"Encore","description":"Learn how to send your first email using Encore and the Resend Node.js SDK.","href":"/send-with-encore-ts"},{"title":"Send Better Auth emails with Resend","sidebarTitle":"Better Auth","href":"/send-with-better-auth"}]},{"group":"Serverless","pages":[{"title":"Send emails with Vercel Functions","sidebarTitle":"Vercel Functions","description":"Learn how to send your first email using Vercel Functions.","href":"/send-with-vercel-functions"},{"title":"Send emails with Supabase Edge Functions","sidebarTitle":"Supabase Edge Functions","href":"/send-with-supabase-edge-functions"},{"title":"Send emails with Cloudflare Workers","sidebarTitle":"Cloudflare Workers","href":"/send-with-cloudflare-workers"},{"title":"Send emails with Deno Deploy","sidebarTitle":"Deno Deploy","href":"/send-with-deno-deploy"},{"title":"Send emails with AWS Lambda","sidebarTitle":"AWS Lambda","href":"/send-with-aws-lambda"}]},{"group":"PHP","pages":[{"title":"Send emails with PHP","sidebarTitle":"Introduction","href":"/send-with-php"},{"title":"Send emails with Laravel","sidebarTitle":"Laravel","href":"/send-with-laravel"},{"title":"Send emails with Symfony","sidebarTitle":"Symfony","href":"/send-with-symfony"}]},{"group":"Ruby","pages":[{"title":"Send emails with Ruby","sidebarTitle":"Introduction","href":"/send-with-ruby"},{"title":"Send emails with Rails","sidebarTitle":"Rails","href":"/send-with-rails"},{"title":"Send emails with Sinatra","sidebarTitle":"Sinatra","href":"/send-with-sinatra"}]},{"group":"Python","pages":[{"title":"Send emails with Python","sidebarTitle":"Introduction","href":"/send-with-python"},{"title":"Send emails with Flask","sidebarTitle":"Flask","href":"/send-with-flask"},{"title":"Send emails with FastAPI","sidebarTitle":"FastAPI","href":"/send-with-fastapi"},{"title":"Send emails with Django","sidebarTitle":"Django","href":"/send-with-django"}]},{"group":"Go","pages":[{"title":"Send emails with Go","sidebarTitle":"Introduction","href":"/send-with-go"},{"title":"Send emails with Encore","sidebarTitle":"Encore","href":"/send-with-encore-go"}]},{"group":"Rust","pages":[{"title":"Send emails with Rust","sidebarTitle":"Introduction","href":"/send-with-rust"},{"title":"Send emails with Axum","sidebarTitle":"Axum","href":"/send-with-axum"}]},{"group":"Elixir","pages":[{"title":"Send emails with Elixir","sidebarTitle":"Introduction","href":"/send-with-elixir"},{"title":"Send emails with Phoenix","sidebarTitle":"Phoenix","href":"/send-with-phoenix"}]},{"group":"Java","pages":[{"title":"Send emails with Java","sidebarTitle":"Introduction","href":"/send-with-java"}]},{"group":".NET","pages":[{"title":"Send emails with .NET","sidebarTitle":"Introduction","href":"/send-with-dotnet"}]},{"group":"SMTP","pages":[{"title":"Send emails with SMTP","sidebarTitle":"Introduction","href":"/send-with-smtp"},{"title":"Send Auth0 transactional emails with Resend","sidebarTitle":"Auth0","href":"/send-with-auth0"},{"title":"Send emails using Customer.io with SMTP","sidebarTitle":"Customer.io","href":"/send-with-customer-io-smtp"},{"title":"Send emails using Django with SMTP","sidebarTitle":"Django","href":"/send-with-django-smtp"},{"title":"Send emails using Laravel with SMTP","sidebarTitle":"Laravel","href":"/send-with-laravel-smtp"},{"title":"Send emails using Liferay with SMTP","sidebarTitle":"Liferay","href":"/send-with-liferay-smtp"},{"title":"Send emails using Nodemailer with SMTP","sidebarTitle":"Nodemailer","href":"/send-with-nodemailer-smtp"},{"title":"Send emails using PHPMailer with SMTP","sidebarTitle":"PHPMailer","href":"/send-with-phpmailer-smtp"},{"title":"Send emails using Rails with SMTP","sidebarTitle":"Rails","href":"/send-with-rails-smtp"},{"title":"Send emails using Retool with SMTP","sidebarTitle":"Retool","href":"/send-with-retool-smtp"},{"title":"Send emails using Supabase with SMTP","sidebarTitle":"Supabase","href":"/send-with-supabase-smtp"},{"title":"Send emails using WordPress with SMTP","sidebarTitle":"WordPress","href":"/send-with-wordpress-smtp"},{"title":"Send emails using NextAuth with SMTP","sidebarTitle":"NextAuth","href":"/send-with-nextauth-smtp"},{"title":"Send emails using Metabase with SMTP","sidebarTitle":"Metabase","href":"/send-with-metabase-smtp"}]},{"title":"Send emails with Resend CLI","sidebarTitle":"CLI","href":"/cli-quickstart"}]}]},{"group":"Learn","pages":[{"group":"Domains","pages":[{"title":"Verified Domains","sidebarTitle":"Introduction","href":"/dashboard/domains/introduction"},{"title":"Managing Domains","sidebarTitle":"Manage Domains","href":"/dashboard/domains/manage-domains"},{"title":"Implementing DMARC","sidebarTitle":"DMARC","href":"/dashboard/domains/dmarc"},{"title":"Implementing BIMI","sidebarTitle":"BIMI","href":"/dashboard/domains/bimi"},{"title":"Open and Click Tracking","sidebarTitle":"Tracking","href":"/dashboard/domains/tracking"},{"title":"Configure Transport Layer Security (TLS)","sidebarTitle":"TLS","href":"/dashboard/domains/tls"},{"title":"Configure a custom Return Path","sidebarTitle":"Return Path","href":"/dashboard/domains/custom-return-path"},{"title":"Choosing a Region","sidebarTitle":"Regions","href":"/dashboard/domains/regions"},{"title":"Claiming a domain","sidebarTitle":"Claim domain","href":"/dashboard/domains/claim"}]},{"group":"Sending","pages":[{"title":"Sending Emails","sidebarTitle":"Introduction","href":"/dashboard/emails/introduction"},{"title":"View and manage emails","sidebarTitle":"Manage Emails","href":"/dashboard/emails/manage-emails"},{"title":"Batch Sending","sidebarTitle":"Batch Sending","href":"/dashboard/emails/batch-sending"},{"title":"Attachments","href":"/dashboard/emails/attachments"},{"title":"Embed Inline Images","sidebarTitle":"Embed Images","href":"/dashboard/emails/embed-inline-images"},{"title":"Schedule Email","href":"/dashboard/emails/schedule-email"},{"title":"Send Test Emails","href":"/dashboard/emails/send-test-emails"},{"title":"Custom Headers","href":"/dashboard/emails/custom-headers"},{"title":"Idempotency Keys","href":"/dashboard/emails/idempotency-keys"},{"title":"Email Bounces","href":"/dashboard/emails/email-bounces"},{"title":"Email Suppressions","href":"/dashboard/emails/email-suppressions"},{"title":"Deliverability Insights","href":"/dashboard/emails/deliverability-insights"},{"title":"Add an unsubscribe link to transactional emails","sidebarTitle":"Unsubscribe Link","href":"/dashboard/emails/add-unsubscribe-to-transactional-emails"},{"title":"Managing Tags","sidebarTitle":"Tags","href":"/dashboard/emails/tags"}]},{"group":"Receiving","pages":[{"title":"Receiving Emails","sidebarTitle":"Introduction","href":"/dashboard/receiving/introduction"},{"title":"Managing Emails","sidebarTitle":"Managing Emails","href":"/dashboard/receiving/manage-emails"},{"title":"Custom Receiving Domains","sidebarTitle":"Custom Domains","href":"/dashboard/receiving/custom-domains"},{"title":"Create a receiving Webhook","sidebarTitle":"Configure webhook","href":"/dashboard/receiving/create-receiving-webhook"},{"title":"Process Receiving Attachments","sidebarTitle":"Attachments","href":"/dashboard/receiving/attachments"},{"title":"Get Email Content","sidebarTitle":"Email Content","href":"/dashboard/receiving/get-email-content"},{"title":"Forward Received Emails","sidebarTitle":"Forward Emails","href":"/dashboard/receiving/forward-emails"},{"title":"Reply to Receiving Emails","sidebarTitle":"Reply to Emails","href":"/dashboard/receiving/reply-to-emails"}]},{"group":"Broadcasts","pages":[{"title":"Sending Broadcasts","sidebarTitle":"Introduction","href":"/dashboard/broadcasts/introduction"},{"title":"Manage Broadcasts","sidebarTitle":"Manage Broadcasts","href":"/dashboard/broadcasts/manage-broadcasts"},{"title":"Compose and send with the Broadcast editor","sidebarTitle":"Broadcast editor","href":"/dashboard/broadcasts/editor"},{"title":"Compose and send Broadcasts with the API","sidebarTitle":"Send with API","href":"/dashboard/broadcasts/send-broadcast-with-api"},{"title":"Performance Tracking","href":"/dashboard/broadcasts/performance-tracking"}]},{"group":"Contacts","pages":[{"title":"Contacts","sidebarTitle":"Introduction","href":"/dashboard/contacts/introduction"},{"title":"Add Contacts","sidebarTitle":"Add Contacts","href":"/dashboard/contacts/add-contacts"},{"title":"Managing Contacts","sidebarTitle":"Manage Contacts","href":"/dashboard/contacts/manage-contacts"},{"title":"Contact properties","sidebarTitle":"Contact Properties","href":"/dashboard/contacts/properties"},{"title":"Managing Segments","sidebarTitle":"Manage Segments","href":"/dashboard/contacts/manage-segments"},{"title":"Topics","sidebarTitle":"Manage Topics","href":"/dashboard/contacts/manage-topics"},{"title":"Managing unsubscribed Contacts","sidebarTitle":"Managing unsubscribes","href":"/dashboard/contacts/managing-unsubscribe-list"},{"title":"Migrating from Audiences to Segments","sidebarTitle":"Migrate from Audiences","href":"/dashboard/contacts/migrating-from-audiences-to-segments"}]},{"group":"Automations","pages":[{"title":"Automations","sidebarTitle":"Introduction","href":"/dashboard/automations/introduction"},{"title":"Create Automations","sidebarTitle":"Create Automations","href":"/dashboard/automations/create-automation"},{"title":"Custom Events","sidebarTitle":"Custom Events","href":"/dashboard/automations/custom-events"},{"title":"Connections","href":"/dashboard/automations/connections"},{"title":"Runs","sidebarTitle":"Runs","href":"/dashboard/automations/runs"},{"group":"Steps","pages":[{"title":"Steps","sidebarTitle":"Steps Reference","href":"/dashboard/automations/steps"},{"title":"Trigger","sidebarTitle":"Trigger","href":"/dashboard/automations/trigger"},{"title":"Condition","sidebarTitle":"Condition","href":"/dashboard/automations/condition"},{"title":"Delay","sidebarTitle":"Delay","href":"/dashboard/automations/delay"},{"title":"Wait for Event","sidebarTitle":"Wait for Event","href":"/dashboard/automations/wait-for-event"},{"title":"Send Email","sidebarTitle":"Send Email","href":"/dashboard/automations/send-email"},{"title":"Add to Segment","sidebarTitle":"Add to Segment","href":"/dashboard/automations/add-to-segment"},{"title":"Contact Update","sidebarTitle":"Contact Update","href":"/dashboard/automations/contact-update"},{"title":"Contact Delete","sidebarTitle":"Contact Delete","href":"/dashboard/automations/contact-delete"}]}]},{"group":"Templates","pages":[{"title":"Using Templates","sidebarTitle":"Introduction","href":"/dashboard/templates/introduction"},{"title":"Create a Template","sidebarTitle":"Create Template","href":"/dashboard/templates/create-template"},{"title":"Compose with the Template editor","sidebarTitle":"Template Editor","href":"/dashboard/templates/template-editor"},{"title":"Working with Variables","sidebarTitle":"Template Variables","href":"/dashboard/templates/template-variables"},{"title":"Version History","sidebarTitle":"Version History","href":"/dashboard/templates/version-history"}]},{"group":"Logs","pages":[{"title":"Introduction","href":"/dashboard/logs/introduction"}]},{"group":"Webhooks","pages":[{"title":"Webhooks","sidebarTitle":"Introduction","href":"/webhooks/introduction"},{"title":"Create a Webhook","sidebarTitle":"Create Webhook","href":"/webhooks/create-webhook"},{"title":"Verify Webhooks Requests","sidebarTitle":"Verify Webhooks Requests","href":"/webhooks/verify-webhooks-requests"},{"title":"Retries and Replays","sidebarTitle":"Retries and Replays","href":"/webhooks/retries-and-replays"},{"title":"Webhook Ingester","sidebarTitle":"Webhook Ingester","href":"/webhooks/ingester"},{"title":"How to Store Webhooks Data","sidebarTitle":"Storing Webhooks Data","href":"/webhooks/how-to-store-webhooks-data"},{"title":"Event Types","href":"/webhooks/event-types"},{"group":"Events reference","pages":[{"title":"email.bounced","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-red.svg","href":"/webhooks/emails/bounced"},{"title":"email.clicked","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-violet.svg","href":"/webhooks/emails/clicked"},{"title":"email.complained","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-amber.svg","href":"/webhooks/emails/complained"},{"title":"email.delivered","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-green.svg","href":"/webhooks/emails/delivered"},{"title":"email.delivery_delayed","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-sand.svg","href":"/webhooks/emails/delivery-delayed"},{"title":"email.failed","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-red.svg","href":"/webhooks/emails/failed"},{"title":"email.opened","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-blue.svg","href":"/webhooks/emails/opened"},{"title":"email.received","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-cyan.svg","href":"/webhooks/emails/received"},{"title":"email.scheduled","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-mauve.svg","href":"/webhooks/emails/scheduled"},{"title":"email.sent","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-sand.svg","href":"/webhooks/emails/sent"},{"title":"email.suppressed","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-bronze.svg","href":"/webhooks/emails/suppressed"},{"title":"domain.created","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-green.svg","href":"/webhooks/domains/created"},{"title":"domain.updated","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-blue.svg","href":"/webhooks/domains/updated"},{"title":"domain.deleted","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-red.svg","href":"/webhooks/domains/deleted"},{"title":"contact.created","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-green.svg","href":"/webhooks/contacts/created"},{"title":"contact.updated","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-blue.svg","href":"/webhooks/contacts/updated"},{"title":"contact.deleted","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-red.svg","href":"/webhooks/contacts/deleted"},{"title":"contact.topics.updated","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-blue.svg","href":"/webhooks/contacts/topics-updated"},{"title":"suppression.added","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-green.svg","href":"/webhooks/suppressions/added"},{"title":"suppression.removed","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-red.svg","href":"/webhooks/suppressions/removed"},{"title":"topic.created","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-green.svg","href":"/webhooks/topics/created"},{"title":"topic.updated","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-blue.svg","href":"/webhooks/topics/updated"},{"title":"topic.deleted","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-red.svg","href":"/webhooks/topics/deleted"},{"title":"inbox.created","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-green.svg","href":"/webhooks/inboxes/created"},{"title":"inbox.updated","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-blue.svg","href":"/webhooks/inboxes/updated"},{"title":"inbox.deleted","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-red.svg","href":"/webhooks/inboxes/deleted"},{"title":"inbox.thread.created","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-green.svg","href":"/webhooks/inboxes/thread-created"},{"title":"inbox.thread.folder.updated","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-blue.svg","href":"/webhooks/inboxes/thread-folder-updated"},{"title":"inbox.thread.assigned","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-violet.svg","href":"/webhooks/inboxes/thread-assigned"},{"title":"inbox.thread.unassigned","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-mauve.svg","href":"/webhooks/inboxes/thread-unassigned"},{"title":"inbox.thread.labels.updated","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-blue.svg","href":"/webhooks/inboxes/thread-labels-updated"},{"title":"inbox.email.received","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-cyan.svg","href":"/webhooks/inboxes/email-received"},{"title":"inbox.email.sent","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-sand.svg","href":"/webhooks/inboxes/email-sent"},{"title":"inbox.draft.created","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-green.svg","href":"/webhooks/inboxes/draft-created"},{"title":"inbox.draft.updated","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-blue.svg","href":"/webhooks/inboxes/draft-updated"},{"title":"inbox.draft.sent","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-sand.svg","href":"/webhooks/inboxes/draft-sent"},{"title":"inbox.draft.deleted","icon":"https://mintlify.s3.us-west-1.amazonaws.com/resend/icons/dot-red.svg","href":"/webhooks/inboxes/draft-deleted"}]}]},{"group":"Inboxes","pages":[{"title":"Inboxes","sidebarTitle":"Introduction","href":"/dashboard/inboxes/introduction"},{"title":"Creating Inboxes","sidebarTitle":"Create Inboxes","href":"/dashboard/inboxes/create-inboxes"},{"title":"Managing Inboxes","sidebarTitle":"Manage Inboxes","href":"/dashboard/inboxes/manage-inboxes"},{"title":"Managing Threads","sidebarTitle":"Manage Threads","href":"/dashboard/inboxes/threads"},{"title":"Inbox Drafts","sidebarTitle":"Drafts","href":"/dashboard/inboxes/drafts"},{"title":"Manage Labels","sidebarTitle":"Manage Labels","href":"/dashboard/inboxes/labels"},{"title":"Inbox Agent","sidebarTitle":"Agent","href":"/dashboard/inboxes/agent"}]}]},{"group":"Resources","pages":[{"title":"Resend Forge","href":"/forge"},{"title":"Official SDKs","sidebarTitle":"SDKs","href":"/sdks"},{"title":"Resend CLI","sidebarTitle":"CLI","href":"/cli"},{"title":"MCP Server","href":"/mcp-server"},{"title":"Integrations","href":"/integrations"},{"title":"Examples","href":"/examples"}]}]},{"tab":"Guides","icon":"books","pages":[{"title":"Guides","href":"/knowledge-base/introduction"}]},{"tab":"API Reference","icon":"rectangle-terminal","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]}]},"title":"Send Better Auth emails with Resend - Resend","buildId":"dpl_AUojGTPodKNPTVaxVPcxnNvkSVqo","deploymentId":"dpl_AUojGTPodKNPTVaxVPcxnNvkSVqo","dynamics":[],"chunks":[]}