Create Resend Account
Get started:
- Go to resend.com and sign up
Get API Key
Generate your key:
- Click API Keys in sidebar
- Click Create API Key
- Name it (e.g., “Development”)
- Permissions: Sending access
- Click Create
- Copy the key (starts with
re_)
.env.local:.env.local
Set Up Your Domain (Optional)
Default: emails send from
onboarding@resend.devTo use your own domain:- In Resend, click Domains
- Click Add Domain
- Enter your domain:
yourapp.com - Copy the DNS records
- Add them to your DNS provider (Cloudflare, Namecheap, etc.)
- Click Verify DNS Records
Can I skip this?
Can I skip this?
Yes! Resend’s default domain works for testing. Add your own domain before launch for better deliverability.
Configure Sender Emails
Open Replace with your actual addresses.
/config.ts and update:/config.ts
Use your domain from Step 3, or keep
@resend.dev while testing.Email Best Practices
Keep It Simple
Plain text + basic HTML. Most email clients don’t support complex CSS.
Include Both Formats
Always send
text AND html. Some users block HTML.Use a Subdomain
Send from
mail.yourapp.com instead of yourapp.com to protect your main domain’s reputation.Test Before Sending
Send to yourself first. Check on mobile and desktop.
Improve Deliverability
Disable click tracking
Disable click tracking
Click tracking modifies links, which can trigger spam filters. Disabling it improves deliverability.
Disable open tracking
Disable open tracking
Tracking pixels can flag emails as spam. Disable for better inbox placement.
Match URLs to sending domain
Match URLs to sending domain
Links should match your sending domain. Mismatched URLs trigger spam filters.
Set up DMARC
Set up DMARC
DMARC tells email providers how to handle failed authentication. Add this TXT record:
Keep emails under 102KB
Keep emails under 102KB
Gmail clips emails over 102KB. Keep body text and images small.
Avoid 'no-reply' addresses
Avoid 'no-reply' addresses
Use real addresses like
support@yourapp.com. One-way communication reduces trust.Host images on your domain
Host images on your domain
Images from other domains look suspicious. Host on your sending domain.
Don't use SVG images
Don't use SVG images
Gmail doesn’t support SVG. Use PNG or JPG instead.
For Marketing Emails
Add unsubscribe links (required by law):Monitor Your Emails
In Resend dashboard:- Emails tab shows all sent emails
- Check delivery status
- See open/click rates
- Track bounces and complaints
Troubleshooting
Emails not sending?
Emails not sending?
Check:
RESEND_API_KEYin.env.local- API key has Sending access
- No typos in email addresses
- Resend dashboard for errors
Emails going to spam?
Emails going to spam?
Fix:
- Verify your domain (add DNS records)
- Use your domain, not
@resend.dev - Avoid spam words: “FREE!”, “URGENT”
- Don’t send too many emails too fast
Domain not verifying?
Domain not verifying?
Common issues:
- Wait up to 60 minutes for DNS propagation
- DNS records must match exactly (no spaces)
- Some DNS providers need
@instead of domain name - Try verifying again after waiting
Hit rate limit?
Hit rate limit?
Free tier: 100 emails/daySolutions:
- Upgrade to paid plan
- Batch emails instead of individual sends
- Check usage in Resend dashboard
