MailMail providers
Mailpit
Local SMTP capture with Docker Mailpit and Nodemailer helpers.
Mailpit is included in docker-compose.yml so you can inspect transactional mail locally without hitting Resend.
Start Mailpit
pnpm docker:up| Service | Default |
|---|---|
| SMTP | localhost:1025 (SMTP_PORT) |
| Web UI | http://localhost:8025 (MAILPIT_URL) |
Environment variables
SMTP_HOST=localhost
SMTP_PORT=1025
# SMTP_USER=
# SMTP_PASS=
MAILPIT_URL=http://localhost:8025packages/env validates these keys. Optional SMTP_USER / SMTP_PASS are passed to Nodemailer when both are set.
Current routing (important)
SMTP branch is commented out
sendViaSmtp is implemented in packages/mail/src/send-email.ts, but
sendEmail currently always calls sendViaResend. Setting SMTP_HOST
does not switch delivery until you uncomment the SMTP branch in
sendEmail (the if (isSmtpConfigured()) path already in that file).
When re-enabled, the intended behavior is:
SMTP_HOSTset → Nodemailer → Mailpit (or your SMTP host)- otherwise → Resend
Until then, use Resend (or the React Email preview server) for local template work: Resend, preview.