Email

Resend for transactional email. Also powers magic link authentication.

RESEND_API_KEY=re_...
RESEND_AUDIENCE_ID=...  # optional, for audience/list management

What It Does

  • Transactional email (welcome, receipts, notifications)
  • Magic link sign-in (when AUTH_RESEND_ENABLED)
  • Audience management for marketing lists

Magic Link Auth

Set RESEND_API_KEY and RESEND_FROM_EMAIL and the auth system picks it up automatically. Magic link works in production; the from address must be a sender on a Resend-verified domain. Abuse is controlled by an optional AUTH_ALLOWED_EMAILS allowlist and per-address/per-IP rate limits instead of a dev-only guard. See Authentication for details.

Domain Setup

  1. Add your domain in Resend Dashboard → Domains
  2. Add the DNS records (DKIM + SPF)
  3. Verify ownership

Without a verified domain, emails send from Resend's shared domain (fine for dev).

Key Files

FilePurpose
src/server/services/resend-service.tsEmail sending logic
src/server/actions/resend-actions.tsServer actions for email
src/config/features-config.tsAUTH_RESEND_ENABLED flag