Email Delivery
Configure Resend and SMTP fallback settings
Variables
| Variable | Required | Purpose |
|---|---|---|
RESEND_API_KEY | Optional | Direct API-based delivery with Resend. |
EMAIL_SENDER | Yes | Sender display name. |
EMAIL_DOMAIN | Yes | Sender domain root. |
NODEMAILER_EMAIL_HOST | Yes (SMTP path) | SMTP host. |
NODEMAILER_EMAIL_PORT | Yes (SMTP path) | SMTP port. |
NODEMAILER_EMAIL_USERNAME | Yes (SMTP path) | SMTP username/login. |
NODEMAILER_EMAIL_PASSWORD | Yes (SMTP path) | SMTP password/token. |
NODEMAILER_FALLBACK_EMAIL | Yes (SMTP path) | Fallback sender mailbox. |
Resend Setup
- Create account at https://resend.com.
- In dashboard, open
Domainsand verify your sending domain. - Open
API Keysand clickCreate API Key. - Copy key and add it to
RESEND_API_KEY.
RESEND_API_KEY="re_..."
EMAIL_SENDER="My Company"
EMAIL_DOMAIN="example.com"SMTP (Nodemailer) Setup
Use your mail provider SMTP values (Resend SMTP, Mailgun, SendGrid, Postmark, or custom SMTP).
NODEMAILER_EMAIL_HOST="smtp.your-provider.com"
NODEMAILER_EMAIL_PORT="465"
NODEMAILER_EMAIL_USERNAME="smtp-username"
NODEMAILER_EMAIL_PASSWORD="smtp-password"
NODEMAILER_FALLBACK_EMAIL="noreply@example.com"Provider Strategy
- Configure at least one delivery path.
- Prefer API delivery (
RESEND_API_KEY) when available. - Keep SMTP fallback valid for resilience.
Keep all email credentials server-side. Never expose them as NEXT_PUBLIC_* variables.