Prerequisites
Setup
1
Get your Resend API key
- Sign in at resend.com/api-keys.
- Click Create API key.
- Name it
vly-yourapp. - Set permission to Sending access (limit by domain if you’ve verified one).
- Copy the key (starts with
re_...).
2
Verify a domain (or skip for testing)
For production, verify the domain you’ll send from:
- In Resend, Domains → Add domain (e.g.,
yourapp.com). - Add the DNS records Resend shows (4–5 records).
- Wait for verification (usually under 5 minutes).
onboarding@resend.dev as the sender — no domain setup needed.3
Connect Resend in vly
In a prompt:vly opens the integration setup dialog. Paste your key. The key is stored as
RESEND_API_KEY.4
Use it in a feature
Configuration
string
required
Your Resend API key. Server-only. Starts with
re_.string
required
Default sender email. Must be from a verified Resend domain (or
onboarding@resend.dev for testing).string
Optional. Display name. Renders as
"Display Name <hello@yourapp.com>".Code patterns
Send a single email
convex/email.ts
Use react-email for templates
For richer emails, use react-email:emails/Welcome.tsx
convex/email.ts
Idempotent sends
Avoid duplicate emails on retry by adding an idempotency key:Webhook: track delivery and bounces
Resend sends webhooks for delivery, open, click, bounce, and complaint events:convex/http.ts
Email templates worth setting up
Welcome email
First impression. Triggered on signup. Keep it short, link to onboarding.
Password reset
Auto-handled by built-in auth — but you can customize the template.
Email verification
Auto-handled. Customize the template to match your brand.
Receipt / invoice
Trigger on Stripe
checkout.session.completed. Include order details and a link to the customer portal.Notification digest
Daily or weekly digest of activity (mentions, assignments, etc.) — gentler than per-event emails.
Magic link
For passwordless auth. Auto-handled.
Deliverability tips
Verify your domain
Verify your domain
Sending from a verified domain (with SPF, DKIM, and DMARC) is the single biggest deliverability lever. Don’t send production mail from
onboarding@resend.dev.Set up DMARC
Set up DMARC
Resend will guide you through SPF and DKIM during domain verification. DMARC is one extra DNS record (
_dmarc.yourapp.com TXT "v=DMARC1; p=none; rua=mailto:dmarc@yourapp.com"). Worth doing.Don't send to invalid addresses
Don't send to invalid addresses
Hard bounces hurt your sender reputation. When you get a bounce webhook, mark the address invalid and stop sending.
Include unsubscribe links
Include unsubscribe links
Required for marketing email; good practice for transactional too. Resend provides a one-click unsubscribe header.
Warm up new domains slowly
Warm up new domains slowly
A brand-new domain sending 10,000 emails on day one looks like spam. Ramp up over a week or two for production sends.
Cost
Resend’s free tier: 3,000 emails/month, 100/day. Paid plans start at $20/month for 50,000 emails. For most vly apps, the free tier is more than enough through early production.Comparison with alternatives
For most vly apps, Resend is the recommended default.
Troubleshooting
'Domain is not verified'
'Domain is not verified'
The
from address uses a domain you haven’t verified in Resend. Either verify it or send from onboarding@resend.dev for testing.Emails arrive in spam
Emails arrive in spam
Verify your domain (SPF, DKIM, DMARC). Avoid spammy-sounding subjects. Send from a real-looking sender (
hello@yourapp.com, not noreply@yourapp.com). Don’t use ALL CAPS.Daily limit hit on free tier
Daily limit hit on free tier
Free tier is 100/day. For higher volume, upgrade to a paid Resend plan.
Related
Email campaigns recipe
Send a campaign to a list of users.
Newsletter platform recipe
Build a complete newsletter app.
Webhooks pattern
The general pattern for handling Resend webhooks.
