Email is handled via the Resend service using the @convex-dev/resend Convex component. The integration supports both transactional and marketing email.
Transactional email
Section titled “Transactional email”RED uses email for authentication flows out of the box:
- Email verification on sign-up
- Password reset links
- Organization invitations
- Waitlist invite notifications
Production mode
Section titled “Production mode”By default, the Resend integration runs in test mode — emails are not delivered to real recipients, keeping development and preview environments safe. To enable live email delivery in production, set the RESEND_LIVE environment variable to true:
RESEND_LIVE=trueWhen unset or set to any other value, the integration stays in test mode.
Emails are sent from Convex actions using durable scheduled functions, ensuring reliable delivery even under load:
import { resend } from "./lib/core/resend"
await resend.sendEmail(ctx, { to: "user@example.com", subject: "Welcome!", html: "<h1>Welcome to the app</h1>",})Marketing email
Section titled “Marketing email”The same Resend integration can be used for marketing emails, newsletters, or drip campaigns. Resend supports audiences and segments — the waitlist module already syncs contacts to a configurable Resend segment via the waitlist.resendSegmentId config key.
Email templates
Section titled “Email templates”RED ships with plain HTML strings for its built-in auth emails. React Email is a recommended next step if you want a component-based authoring experience for custom templates — it is not wired in by default.
Key files
Section titled “Key files”| File | Purpose |
|---|---|
packages/backend/src/convex/lib/core/resend.ts | Resend component setup and send helper |
packages/backend/src/convex/lib/core/auth/convex_auth.ts | Auth email hooks (verification, reset, invitation) |