Email

Transactional emails are sent using Resend.

Setup

  1. Create a Resend account.
  2. Get your API Key.
  3. Add it to your .env file:
RESEND_API_KEY="re_123456789"

Sending Emails

You can send emails using the Resend SDK.

import { Resend } from 'resend';

const resend = new Resend(process.env.RESEND_API_KEY);

await resend.emails.send({
  from: 'onboarding@resend.dev',
  to: 'user@example.com',
  subject: 'Welcome!',
  html: '<p>Thanks for signing up!</p>'
});

Templates

It is recommended to use React components for your email templates. You can create them in src/components/emails/ and render them to HTML before sending.