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-production or nebutra-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:check

Then 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

SymptomLikely causeFix
Domain remains unverifiedDNS records are missing or still propagatingCheck DNS records and wait for propagation
Emails land in spamSPF, DKIM, or DMARC is incompleteAdd the records Resend provides
Sending fails at runtimeRESEND_API_KEY is missing or invalidVerify the environment value and key scope
Wrong sender appearsEMAIL_FROM does not match the verified domainUse an address on the verified domain

How is this guide?

Edit on GitHub

Last updated on

On this page