Email Setup
PacBoiler uses Resend for sending transactional emails (like Magic Links and Welcome emails).
1. Create Resend Account
- Sign up at Resend.com.
- Go to API Keys.
- Create a new API Key with "Full Access" (or "Sending Access").
- Copy the key and paste it into
.env.local:
RESEND_API_KEY=re_1234567892. Verify Domain
For best deliverability, you should verify your domain.
- Go to Domains.
- Add your domain (e.g.,
myapp.com). - Add the DNS records provided by Resend to your DNS provider (Cloudflare, GoDaddy, Vercel, etc.).
- Once verified, update the
FROM_EMAILin.env.local:
# Before verification (testing only)
FROM_EMAIL=onboarding@resend.dev
# After verification
FROM_EMAIL=noreply@myapp.comNote: DNS verification usually takes 5-15 minutes, but can take up to 24 hours depending on your DNS provider.
3. Testing Locally
Without Domain Verification (Quick Testing)
When using onboarding@resend.dev as your FROM address, you can only send to Resend's test email addresses:
delivered@resend.dev- simulates successful deliverybounced@resend.dev- simulates a bouncecomplained@resend.dev- simulates a spam complaint
To test with these:
- Temporarily add a test email to your waitlist/database:
INSERT INTO waitlist (email, full_name)
VALUES ('delivered@resend.dev', 'Test User');- Send your announcement or magic link through your app
- Check the Resend dashboard Emails section to confirm delivery
With Domain Verification (Real Testing)
Once you've verified your domain (Step 2), you can send to any real email address, including your own. This is the recommended approach for proper testing before launch.
Benefits:
- Test with real email addresses
- See how emails appear in actual inboxes
- Test spam filter behavior
- Verify links and formatting
4. Monitoring & Logs
View all sent emails in the Resend dashboard:
- Go to Emails in the sidebar
- See delivery status, open rates, and click tracking
- View email content and troubleshoot issues
5. Rate Limits
Free Tier:
- 100 emails/day
- 3,000 emails/month
Pro Tier:
- Starting at $20/month
- 50,000 emails/month
- Higher sending limits
Check Resend Pricing for current limits.
Troubleshooting
Error: "API key is invalid" (401)
Causes:
- Wrong API key in
.env.local - API key deleted from Resend dashboard
- API key doesn't have "Sending Access"
Solutions:
- Check your
.env.localfile has the correct key - Verify the key exists in Resend dashboard → API Keys
- Create a new API key with "Full Access" if needed
- Restart your dev server after updating
.env.local
Error: "Invalid to field" (422)
Causes:
- Using
onboarding@resend.devas FROM address - Trying to send to real emails without domain verification
Solutions:
- For testing: Use
delivered@resend.devas recipient - For production: Verify your domain (see Step 2)
- Update
FROM_EMAILto your verified domain
Emails not arriving
Check:
- Resend dashboard → Emails → Check delivery status
- Spam/Junk folder in recipient inbox
- Domain verification status (for custom domains)
- DNS records are correctly configured
DNS Verification Taking Too Long
Tips:
- Most DNS changes propagate in 5-15 minutes
- Some providers (like GoDaddy) can take up to 24 hours
- Use DNS Checker to verify records are live
- Make sure you added ALL required records (SPF, DKIM, DMARC)
Next Steps
Your app is fully configured! Now let's deploy it.