Skip to main content
@repo/email sends transactional email (verification, password resets, receipts) through Resend. Templates live in apps/email/ as React Email components.

Usage

Send an email from any server context:
apps/api/routes/invite.ts
import { sendEmail } from "@repo/email";

await sendEmail({
  to: email,
  subject: `You've been invited to ${teamName}`,
  template: "team-invitation",
  props: { teamName, inviteUrl },
});

Templates

Templates are React components in apps/email/:
apps/email/emails/welcome.tsx
import { Html, Head, Body, Text } from "@react-email/components";

export default function WelcomeEmail({ name }: { name: string }) {
  return (
    <Html>
      <Head />
      <Body>
        <Text>Welcome, {name}! Your account is ready.</Text>
      </Body>
    </Html>
  );
}
Preview templates locally: bun run dev --filter=email.

Environment Variables

See Environment Variables — Email.

Learn More