> ## Documentation Index
> Fetch the complete documentation index at: https://supastack.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For the full documentation corpus in one file, fetch: https://supastack.dev/llms-full.txt

# Add Resend email

Create a free Resend account, verify a sending domain, and switch EMAIL_PROVIDER so codes and receipts reach real inboxes.

## Beginner walkthrough

Prerequisites: the app running locally (Ship in 5 minutes). Start free, no card, and Resend's free tier covers development volumes.

Quick terms: `EMAIL_PROVIDER=local` is the default, messages are written to the built-in `/mail-preview` page and never leave your machine, which is perfect while building. Resend is the adapter that delivers to real inboxes. `EMAIL_FROM` is the sender identity templates use; its address must sit on a domain Resend has verified. DNS records are the lines you paste at your registrar or Cloudflare so receiving mailboxes trust your sender.

What you create: a Resend account, a verified sending domain, and one API key, the domain step is the only waiting part, since DNS propagation runs from minutes to hours.

[Set up the database](https://supastack.dev/docs/web/setup-database.md)


## Create the Resend account

1. Open [resend.com](https://resend.com) → Sign up, confirm your email, and you land on the dashboard.

2. Start with the free tier, you can even send test mail from Resend's shared sender before owning a domain, which the next section covers.


## Verify your sending domain

Quick try, no domain: the address `onboarding@resend.dev` works as `EMAIL_FROM` immediately, but it only delivers to the email you signed up with, never to users. Use it to see the pipeline work, then do the real setup.

1. Open Domains → Add Domain and enter the domain you send from (for example `yourdomain.com`; a subdomain such as `mail.yourdomain.com` also works and keeps records tidy).

2. Resend lists the DNS records to create, DKIM TXT records plus MX/SPF or CNAME entries depending on account age. Add each one at your DNS host: your registrar's DNS page, or Cloudflare if you moved nameservers. On Cloudflare keep the proxy cloud grey (DNS only) for mail records, proxied records never verify.

3. Back in Resend click Verify. Expected: the domain flips to Verified. Propagation varies from minutes to a day; the domain page names the exact record that still fails to resolve.

Once verified, any address on the domain works as a sender, `hello@`, `no-reply@`, whatever `EMAIL_FROM` uses, no per-address registration needed.


## Create the API key

1. Open API Keys → Create API Key.

2. Permission: Sending access is enough, the kit only sends. Name the key for its environment (`production`, `local`) so a leaked dev key can be revoked without touching production.

3. Copy the `re_…` key now, it is shown once. Losing it just means creating another.


## Add the values to the app

Set the lines below in `apps/web/.env.local`. `RESEND_API_KEY` is server-only, never `NEXT_PUBLIC_`/`EXPO_PUBLIC_`, never committed; `EMAIL_PROVIDER` and `EMAIL_FROM` are plain configuration. Restart the dev server after editing.

`EMAIL_FROM` must sit on the verified domain: `onboarding@resend.dev` only reaches your own signup address, and an unverified domain gets a 403 rejection from Resend.

```
# apps/web/.env.local
EMAIL_PROVIDER=resend
EMAIL_FROM="Your Product <hello@yourdomain.com>"
RESEND_API_KEY=re_…
```


## Verify and troubleshoot

Restart, open `/auth`, and request a sign-in code to a real inbox you control. Expected: the message arrives, and Resend → Emails shows the delivery with a green status, that log is also where bounce and error reasons live.

Nothing sent? Check `EMAIL_PROVIDER=resend` actually saved in `apps/web/.env.local` and restart. A 403 in the server log means `EMAIL_FROM` is not on the verified domain, or `onboarding@resend.dev` was sent to someone other than yourself.

Different provider later? `EMAIL_PROVIDER` also accepts `ses` (with the AWS keys) and the `postmark`, `sendgrid`, `mailgun`, `smtp`, `brevo` transports, same `EMAIL_FROM` contract, different env names, all listed in `.env.example`. The email guide compares them.

[Compare the email providers](https://supastack.dev/docs/web/setup-email.md)

[Collect the remaining provider keys next](https://supastack.dev/docs/web/provider-keys.md)

[Resend vs Amazon SES: cost and setup compared](https://supastack.dev/blog/resend-vs-amazon-ses.md)


If you want to continue setup, read [Set up Amazon SES email](https://supastack.dev/docs/web/aws-ses.md).


## Next

[Set up Amazon SES email](https://supastack.dev/docs/web/aws-ses.md)
