Email (Resend)
Setup adds your sending domain to Resend and creates its DNS records, automatically if your DNS is on Cloudflare.
Do you need it?
| Where | Without Resend |
|---|---|
| Local development | Works. Emails (confirmation links, password resets) print in the terminal running npm run dev |
| Production | Email and password sign-in is hidden, because confirmation emails can't be sent. Only Google and GitHub sign-in are offered |
So Resend is optional locally, and needed in production if you want email and password sign-in. When you chose to deploy, setup offers it by default.
What you need
- A Resend account.
- A domain you own, such as
yourdomain.com, where you can add DNS records.
Steps
Create a Resend API key
- Open resend.com → API Keys → Create API key.
- Choose Full access. Setup needs it to add your domain; a "Sending access" key can't.
- Copy the key and paste it when setup asks.
Enter your domain
Type the domain to send email from, such as yourdomain.com. Emails go out from hello@yourdomain.com with your product's name, for example Acme <hello@yourdomain.com>. Change EMAIL_FROM in .env.local if you want a different address.
Many people send from a subdomain such as mail.yourdomain.com, to keep the main domain's email reputation separate.
Add the DNS records
Resend gives you a few DNS records (for the domain's SPF and DKIM). Setup asks how to add them:
Choose Add them automatically if the domain's DNS is on Cloudflare.
- Open dash.cloudflare.com → My Profile → API Tokens → Create Token.
- Use the Edit zone DNS template, and include the zone for your domain.
- Copy the token and paste it into setup.
Setup creates the records and skips any that already exist. The token isn't saved.
Verification
Setup asks Resend to verify the domain. This usually takes a few minutes but can take longer while DNS updates spread. Check its status at resend.com/domains. Emails fail until the domain shows Verified.
Setup saves RESEND_API_KEY and EMAIL_FROM.
Problems
See Email errors.