[{"data":1,"prerenderedAt":631,"buildId":632},["ShallowReactive",2],{"\u002Fdocs\u002Femails":3,"\u002Fdocs\u002Femails-docs-surround":395,"contentNavigation":405,"docsNavigation":577},{"id":4,"title":5,"body":6,"description":383,"extension":384,"links":385,"meta":386,"navigation":387,"path":389,"seo":390,"sitemap":391,"stem":393,"__hash__":394},"docs\u002Fdocs\u002F04.emails\u002F1.index.md","Send Emails in Nuxt with Plunk or Resend",{"type":7,"value":8,"toc":376},"minimark",[9,32,37,49,60,64,86,222,228,239,242,251,257,295,298,303,326,330,352,372],[10,11,12,13,20,21,26,27,31],"p",{},"Nuxt Starter Kit includes a simple Nuxt layer that allows you to send emails using ",[14,15,19],"a",{"href":16,"rel":17},"https:\u002F\u002Fwww.useplunk.com\u002F",[18],"nofollow","Plunk"," or ",[14,22,25],{"href":23,"rel":24},"https:\u002F\u002Fresend.com\u002F",[18],"Resend",". This layer is located in ",[28,29,30],"code",{},"apps\u002Fweb\u002Flayers\u002Femails"," and is responsible for managing the email connection, sending emails, and handling errors.",[33,34,36],"h2",{"id":35},"nuxt-email-renderer","Nuxt Email Renderer",[10,38,39,40,44,45,48],{},"I use ",[14,41,36],{"href":42,"rel":43},"https:\u002F\u002Fnuxtemail.com",[18]," which provides a collection of high-quality, unstyled components for creating emails using Vue and TypeScript. The pre-defined templates are located in ",[28,46,47],{},"apps\u002Fweb\u002Flayers\u002Femails\u002Fapp\u002Femails\u002F",". You can use these templates to create your own emails or modify them to fit your needs.",[10,50,51,52,55,56,59],{},"Any layer can bring its own templates in an ",[28,53,54],{},"app\u002Femails\u002F"," folder. The waitlist layer, for example, has ",[28,57,58],{},"WaitlistConfirmation.vue",".",[33,61,63],{"id":62},"sending-emails","Sending Emails",[10,65,66,67,70,71,74,75,74,78,81,82,85],{},"On the server, ",[28,68,69],{},"useEmail()"," has helpers for the built-in emails (",[28,72,73],{},"sendVerificationEmail",", ",[28,76,77],{},"sendPasswordResetEmail",[28,79,80],{},"sendContactSubmissionEmail",") and ",[28,83,84],{},"sendTemplate()"," for any other template:",[87,88,93],"pre",{"className":89,"code":90,"language":91,"meta":92,"style":92},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","await useEmail().sendTemplate({\n  props: { name: user.name },\n  subject: 'Welcome!',\n  template: 'Welcome', \u002F\u002F a component in any app\u002Femails\u002F folder\n  to: user.email,\n})\n","ts","",[28,94,95,124,153,174,196,213],{"__ignoreMap":92},[96,97,100,104,108,112,115,118,121],"span",{"class":98,"line":99},"line",1,[96,101,103],{"class":102},"s7zQu","await",[96,105,107],{"class":106},"s2Zo4"," useEmail",[96,109,111],{"class":110},"sTEyZ","()",[96,113,59],{"class":114},"sMK4o",[96,116,117],{"class":106},"sendTemplate",[96,119,120],{"class":110},"(",[96,122,123],{"class":114},"{\n",[96,125,127,131,134,137,140,142,145,147,150],{"class":98,"line":126},2,[96,128,130],{"class":129},"swJcz","  props",[96,132,133],{"class":114},":",[96,135,136],{"class":114}," {",[96,138,139],{"class":129}," name",[96,141,133],{"class":114},[96,143,144],{"class":110}," user",[96,146,59],{"class":114},[96,148,149],{"class":110},"name ",[96,151,152],{"class":114},"},\n",[96,154,156,159,161,164,168,171],{"class":98,"line":155},3,[96,157,158],{"class":129},"  subject",[96,160,133],{"class":114},[96,162,163],{"class":114}," '",[96,165,167],{"class":166},"sfazB","Welcome!",[96,169,170],{"class":114},"'",[96,172,173],{"class":114},",\n",[96,175,177,180,182,184,187,189,192],{"class":98,"line":176},4,[96,178,179],{"class":129},"  template",[96,181,133],{"class":114},[96,183,163],{"class":114},[96,185,186],{"class":166},"Welcome",[96,188,170],{"class":114},[96,190,191],{"class":114},",",[96,193,195],{"class":194},"sHwdD"," \u002F\u002F a component in any app\u002Femails\u002F folder\n",[96,197,199,202,204,206,208,211],{"class":98,"line":198},5,[96,200,201],{"class":129},"  to",[96,203,133],{"class":114},[96,205,144],{"class":110},[96,207,59],{"class":114},[96,209,210],{"class":110},"email",[96,212,173],{"class":114},[96,214,216,219],{"class":98,"line":215},6,[96,217,218],{"class":114},"}",[96,220,221],{"class":110},")\n",[10,223,224,225,59],{},"In development, emails are only logged unless you set ",[28,226,227],{},"NUXT_PRIVATE_EMAIL_SEND_IN_DEV_MODE=true",[10,229,230,231,234,235,238],{},"Two values are required: ",[28,232,233],{},"NUXT_PRIVATE_FROM_EMAIL"," (sender of all emails) and ",[28,236,237],{},"NUXT_PRIVATE_EMAIL_CONTACT"," (receives contact form submissions).",[33,240,19],{"id":241},"plunk",[243,244,245],"tip",{},[10,246,247,248,59],{},"My recommendation is to use a self-hosted version of ",[14,249,19],{"href":16,"rel":250},[18],[10,252,253,254,133],{},"To enable Plunk, you need to set the following environment variables in ",[28,255,256],{},"apps\u002Fweb\u002F.env",[87,258,262],{"className":259,"code":260,"language":261,"meta":92,"style":92},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","NUXT_PRIVATE_EMAIL_PROVIDER=plunk\nNUXT_PRIVATE_EMAIL_PLUNK_API_URL=YOUR_API_URL\nNUXT_PRIVATE_EMAIL_PLUNK_API_KEY=YOUR_API_KEY\n","bash",[28,263,264,275,285],{"__ignoreMap":92},[96,265,266,269,272],{"class":98,"line":99},[96,267,268],{"class":110},"NUXT_PRIVATE_EMAIL_PROVIDER",[96,270,271],{"class":114},"=",[96,273,274],{"class":166},"plunk\n",[96,276,277,280,282],{"class":98,"line":126},[96,278,279],{"class":110},"NUXT_PRIVATE_EMAIL_PLUNK_API_URL",[96,281,271],{"class":114},[96,283,284],{"class":166},"YOUR_API_URL\n",[96,286,287,290,292],{"class":98,"line":155},[96,288,289],{"class":110},"NUXT_PRIVATE_EMAIL_PLUNK_API_KEY",[96,291,271],{"class":114},[96,293,294],{"class":166},"YOUR_API_KEY\n",[33,296,25],{"id":297},"resend",[10,299,300,301,133],{},"To enable Resend as email provider, you need to set the following environment variables in ",[28,302,256],{},[87,304,306],{"className":259,"code":305,"language":261,"meta":92,"style":92},"NUXT_PRIVATE_EMAIL_PROVIDER=resend\nNUXT_PRIVATE_EMAIL_RESEND_API_TOKEN=YOUR_API_KEY\n",[28,307,308,317],{"__ignoreMap":92},[96,309,310,312,314],{"class":98,"line":99},[96,311,268],{"class":110},[96,313,271],{"class":114},[96,315,316],{"class":166},"resend\n",[96,318,319,322,324],{"class":98,"line":126},[96,320,321],{"class":110},"NUXT_PRIVATE_EMAIL_RESEND_API_TOKEN",[96,323,271],{"class":114},[96,325,294],{"class":166},[33,327,329],{"id":328},"other-providers","Other Providers",[10,331,332,333,336,337,340,341,344,345,348,349,59],{},"You can easily add support for other email providers by adding a new provider in ",[28,334,335],{},"apps\u002Fweb\u002Flayers\u002Femails\u002Fserver\u002Fproviders\u002F"," and selecting it in ",[28,338,339],{},"apps\u002Fweb\u002Flayers\u002Femails\u002Fserver\u002Futils\u002FgetEmailProvider.ts",". A provider implements the ",[28,342,343],{},"EmailProvider"," interface. Add the new provider name to the ",[28,346,347],{},"emailProvider"," enum in ",[28,350,351],{},"apps\u002Fweb\u002Flayers\u002Femails\u002Fnuxt.config.ts",[10,353,354,355,360,361,366,367,59],{},"Checkout ",[14,356,359],{"href":357,"rel":358},"https:\u002F\u002Fgithub.com\u002FSupersaasHQ\u002FuseEmail\u002Ftree\u002Fmain\u002Fsrc\u002Fservices",[18],"useEmail"," which includes other email providers like ",[14,362,365],{"href":363,"rel":364},"https:\u002F\u002Fsendgrid.com\u002F",[18],"SendGrid"," and ",[14,368,371],{"href":369,"rel":370},"https:\u002F\u002Fwww.mailgun.com\u002F",[18],"Mailgun",[373,374,375],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":92,"searchDepth":126,"depth":126,"links":377},[378,379,380,381,382],{"id":35,"depth":126,"text":36},{"id":62,"depth":126,"text":63},{"id":241,"depth":126,"text":19},{"id":297,"depth":126,"text":25},{"id":328,"depth":126,"text":329},"Send transactional emails from your Nuxt app with Plunk or Resend, build templates with Nuxt Email Renderer and use the useEmail() helpers on the server.","md",null,{},{"title":388},"Overview","\u002Fdocs\u002Femails",{"title":5,"description":383},{"loc":389,"lastmod":392},"2026-12-02","docs\u002F04.emails\u002F1.index","kbVaggPvQvN37ktwtOqTiID3hBotrO2XgWTdB7SlDI4",[396,401],{"title":397,"path":398,"stem":399,"description":400,"children":-1},"PostgreSQL","\u002Fdocs\u002Fdatabase","docs\u002F03.database\u002F1.index","Nuxt Starter Kit uses PostgreSQL with Drizzle ORM. Each layer owns its tables, drizzle-kit generates the migrations, and any PostgreSQL provider works.",{"title":388,"path":402,"stem":403,"description":404,"children":-1},"\u002Fdocs\u002Fauthentication","docs\u002F05.authentication\u002F1.index","Email and password, Google and GitHub login and passkeys with better-auth in Nuxt 4: sessions stored in PostgreSQL, environment variables and setup.",[406,436],{"title":407,"path":408,"stem":409,"children":410,"page":435},"Blog","\u002Fblog","blog",[411,415,419,423,427,431],{"title":412,"path":413,"stem":414},"How to Build a SaaS with Nuxt 4, better-auth, and Polar","\u002Fblog\u002Fbuild-saas-with-nuxt-4-better-auth-polar","blog\u002Fbuild-saas-with-nuxt-4-better-auth-polar",{"title":416,"path":417,"stem":418},"DIY vs Nuxt Starter Kit - The Real Cost of Auth and Payments","\u002Fblog\u002Fdiy-vs-nuxt-starter-kit-cost","blog\u002Fdiy-vs-nuxt-starter-kit-cost",{"title":420,"path":421,"stem":422},"Nuxt Boilerplate for Solo Founders - Ship Without Rebuilding Foundations","\u002Fblog\u002Fnuxt-boilerplate-for-solo-founders","blog\u002Fnuxt-boilerplate-for-solo-founders",{"title":424,"path":425,"stem":426},"Best Nuxt SaaS Boilerplate in 2026 - What Actually Matters","\u002Fblog\u002Fnuxt-saas-boilerplate-comparison","blog\u002Fnuxt-saas-boilerplate-comparison",{"title":428,"path":429,"stem":430},"Nuxt Starter Kit v3: Delete the Features You Don't Need","\u002Fblog\u002Fnuxt-starter-kit-v3-layer-architecture","blog\u002Fnuxt-starter-kit-v3-layer-architecture",{"title":432,"path":433,"stem":434},"Polar Checkout and Customer Portal in Nuxt with the better-auth Plugin","\u002Fblog\u002Fpolar-checkout-customer-portal-better-auth-nuxt","blog\u002Fpolar-checkout-customer-portal-better-auth-nuxt",false,{"title":437,"path":438,"stem":439,"children":440,"page":435},"Documentation","\u002Fdocs","docs",[441,473,485,490,495,500,508,516,523,530,537,545,552,559,571],{"title":442,"path":443,"stem":444,"children":445,"icon":472},"Getting Started","\u002Fdocs\u002Fgetting-started","docs\u002F01.getting-started\u002F1.index",[446,448,452,456,460,464,468],{"title":447,"path":443,"stem":444},"Introduction",{"title":449,"path":450,"stem":451},"Installation","\u002Fdocs\u002Fgetting-started\u002Finstallation","docs\u002F01.getting-started\u002F2.installation",{"title":453,"path":454,"stem":455},"Setup","\u002Fdocs\u002Fgetting-started\u002Fsetup","docs\u002F01.getting-started\u002F3.setup",{"title":457,"path":458,"stem":459},"Pull Updates","\u002Fdocs\u002Fgetting-started\u002Fpull-updates","docs\u002F01.getting-started\u002F4.pull-updates",{"title":461,"path":462,"stem":463},"Upgrade to the Layer Architecture","\u002Fdocs\u002Fgetting-started\u002Fupgrade-to-layer-architecture","docs\u002F01.getting-started\u002F5.upgrade-to-layer-architecture",{"title":465,"path":466,"stem":467},"Deployment","\u002Fdocs\u002Fgetting-started\u002Fdeployment","docs\u002F01.getting-started\u002F6.deployment",{"title":469,"path":470,"stem":471},"Going to production","\u002Fdocs\u002Fgetting-started\u002Fgoing-to-production","docs\u002F01.getting-started\u002F7.going-to-production","i-lucide-square-play",{"title":474,"path":475,"stem":476,"children":477,"icon":484},"Architecture","\u002Fdocs\u002Farchitecture","docs\u002F02.architecture\u002F1.index",[478,480],{"title":479,"path":475,"stem":476},"Tech Stack",{"title":481,"path":482,"stem":483},"Layers","\u002Fdocs\u002Farchitecture\u002Flayers","docs\u002F02.architecture\u002F2.layers","i-lucide-layers",{"title":486,"path":398,"stem":399,"children":487,"icon":489},"Database",[488],{"title":397,"path":398,"stem":399},"i-lucide-database",{"title":491,"path":389,"stem":393,"children":492,"icon":494},"Emails",[493],{"title":388,"path":389,"stem":393},"i-lucide-mail",{"title":496,"path":402,"stem":403,"children":497,"icon":499},"Authentication",[498],{"title":388,"path":402,"stem":403},"i-lucide-lock-keyhole",{"title":501,"path":502,"stem":503,"children":504,"icon":507},"Payments","\u002Fdocs\u002Fpayments","docs\u002F06.payments\u002F1.index",[505],{"title":506,"path":502,"stem":503},"Polar","i-lucide-circle-dollar-sign",{"title":509,"path":510,"stem":511,"children":512,"icon":515},"Admin","\u002Fdocs\u002Fadmin","docs\u002F07.admin\u002F1.index",[513],{"title":514,"path":510,"stem":511},"Features","i-lucide-user-cog",{"title":517,"path":518,"stem":519,"children":520,"icon":522},"Images","\u002Fdocs\u002Fimages","docs\u002F08.images\u002F1.index",[521],{"title":388,"path":518,"stem":519},"i-lucide-image",{"title":524,"path":525,"stem":526,"children":527,"icon":529},"i18n","\u002Fdocs\u002Fi18n","docs\u002F09.i18n\u002F1.index",[528],{"title":388,"path":525,"stem":526},"i-lucide-languages",{"title":531,"path":532,"stem":533,"children":534,"icon":536},"SEO","\u002Fdocs\u002Fseo","docs\u002F10.seo\u002F1.index",[535],{"title":388,"path":532,"stem":533},"i-lucide-globe",{"title":538,"path":539,"stem":540,"children":541,"icon":544},"Analytics","\u002Fdocs\u002Fanalytics","docs\u002F11.analytics\u002F1.index",[542],{"title":543,"path":539,"stem":540},"Umami","i-lucide-chart-line",{"title":546,"path":547,"stem":548,"children":549,"icon":551},"Security","\u002Fdocs\u002Fsecurity","docs\u002F12.security\u002F1.index",[550],{"title":388,"path":547,"stem":548},"i-lucide-file-lock",{"title":553,"path":554,"stem":555,"children":556,"icon":558},"Testing","\u002Fdocs\u002Ftesting","docs\u002F13.testing\u002F1.index",[557],{"title":553,"path":554,"stem":555},"i-lucide-test-tube",{"title":560,"path":561,"stem":562,"children":563,"icon":570},"Support","\u002Fdocs\u002Fsupport","docs\u002F14.support\u002F1.index",[564,566],{"title":565,"path":561,"stem":562},"Help",{"title":567,"path":568,"stem":569},"Troubleshooting","\u002Fdocs\u002Fsupport\u002Ftroubleshooting","docs\u002F14.support\u002F2.troubleshooting","i-lucide-message-circle-question",{"title":572,"path":573,"stem":574,"children":575},"LLMs","\u002Fdocs\u002Fllms","docs\u002F15.llms\u002F1.index",[576],{"title":572,"path":573,"stem":574},[578,587,591,594,597,600,603,606,609,612,615,618,621,624,628],{"title":442,"path":443,"stem":444,"children":579,"icon":472},[580,581,582,583,584,585,586],{"title":447,"path":443,"stem":444},{"title":449,"path":450,"stem":451},{"title":453,"path":454,"stem":455},{"title":457,"path":458,"stem":459},{"title":461,"path":462,"stem":463},{"title":465,"path":466,"stem":467},{"title":469,"path":470,"stem":471},{"title":474,"path":475,"stem":476,"children":588,"icon":484},[589,590],{"title":479,"path":475,"stem":476},{"title":481,"path":482,"stem":483},{"title":486,"path":398,"stem":399,"children":592,"icon":489},[593],{"title":397,"path":398,"stem":399},{"title":491,"path":389,"stem":393,"children":595,"icon":494},[596],{"title":388,"path":389,"stem":393},{"title":496,"path":402,"stem":403,"children":598,"icon":499},[599],{"title":388,"path":402,"stem":403},{"title":501,"path":502,"stem":503,"children":601,"icon":507},[602],{"title":506,"path":502,"stem":503},{"title":509,"path":510,"stem":511,"children":604,"icon":515},[605],{"title":514,"path":510,"stem":511},{"title":517,"path":518,"stem":519,"children":607,"icon":522},[608],{"title":388,"path":518,"stem":519},{"title":524,"path":525,"stem":526,"children":610,"icon":529},[611],{"title":388,"path":525,"stem":526},{"title":531,"path":532,"stem":533,"children":613,"icon":536},[614],{"title":388,"path":532,"stem":533},{"title":538,"path":539,"stem":540,"children":616,"icon":544},[617],{"title":543,"path":539,"stem":540},{"title":546,"path":547,"stem":548,"children":619,"icon":551},[620],{"title":388,"path":547,"stem":548},{"title":553,"path":554,"stem":555,"children":622,"icon":558},[623],{"title":553,"path":554,"stem":555},{"title":560,"path":561,"stem":562,"children":625,"icon":570},[626,627],{"title":565,"path":561,"stem":562},{"title":567,"path":568,"stem":569},{"title":572,"path":573,"stem":574,"children":629},[630],{"title":572,"path":573,"stem":574},1796282654039,"e90768e1-1006-4f68-a0b7-e7c6553b660f"]