
Resend Has a Free Email API — Send Transactional Emails with React Components as Templates
Why Resend? Resend lets you build email templates as React components and send them via API. No more HTML tables and inline styles. npm install resend @react-email/components Send an Email import { Resend } from ' resend ' const resend = new Resend ( ' re_123456789 ' ) await resend . emails . send ({ from : ' hello@yourdomain.com ' , to : ' user@example.com ' , subject : ' Welcome! ' , html : ' <h1>Welcome to our app!</h1> ' , }) React Email Templates import { Html , Head , Body , Container , Heading , Text , Button } from ' @react-email/components ' export function WelcomeEmail ({ name , loginUrl }) { return ( < Html > < Head /> < Body style = {{ fontFamily : ' sans-serif ' }} > < Container > < Heading > Welcome , { name } !< /Heading > < Text > Thanks for signing up . Click below to get started . < /Text > < Button href = { loginUrl } style = {{ background : ' #000 ' , color : ' #fff ' , padding : ' 12px 24px ' }} > Go to Dashboard < /Button > < /Container > < /Body > < /Html > ) } S
Continue reading on Dev.to React
Opens in a new tab



