Email Providers
Configure Resend credentials and verified sending domains for @nebutra/email.
@nebutra/email currently delivers through Resend. The package can be
imported without credentials for tests and preview checks; a real
RESEND_API_KEY is required only when a sender helper dispatches an email.
Alternative providers can be added later behind the same public sender helpers. Keep provider-specific behavior out of callers.
Resend setup
Sign up at resend.com. The free tier is enough for local development and early staging validation.
Go to Resend dashboard → Domains → Add Domain.
Use a subdomain such as mail.nebutra.com so email reputation is isolated
from the root product domain.
Go to Resend dashboard → API Keys → Create API Key.
- Name:
nebutra-productionornebutra-staging - Permission: sending access
- Domain: restrict to the verified sending domain
RESEND_API_KEY=re_...
EMAIL_FROM=Nebutra <[email protected]>pnpm --filter @nebutra/email test
pnpm mail:checkThen use a Resend test key for a controlled delivery log.
Resend test key
# .env.local — development only
RESEND_API_KEY=re_test_...
EMAIL_FROM=Nebutra <[email protected]>Never use a test key in production. Test emails are not delivered to real recipients.
Domain troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Domain remains unverified | DNS records are missing or still propagating | Check DNS records and wait for propagation |
| Emails land in spam | SPF, DKIM, or DMARC is incomplete | Add the records Resend provides |
| Sending fails at runtime | RESEND_API_KEY is missing or invalid | Verify the environment value and key scope |
| Wrong sender appears | EMAIL_FROM does not match the verified domain | Use an address on the verified domain |
How is this guide?
Last updated on