Skip to content

Email

Email is handled via the Resend service using the @convex-dev/resend Convex component. The integration supports both transactional and marketing email.

RED uses email for authentication flows out of the box:

  • Email verification on sign-up
  • Password reset links
  • Organization invitations
  • Waitlist invite notifications

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:

Terminal window
RESEND_LIVE=true

When 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>",
})

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.

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.

FilePurpose
packages/backend/src/convex/lib/core/resend.tsResend component setup and send helper
packages/backend/src/convex/lib/core/auth/convex_auth.tsAuth email hooks (verification, reset, invitation)