Skip to main content
Resend is a modern email API. Clean docs, generous free tier (3,000 emails/month, 100/day), and deliverability that just works. It’s the default email integration in vly for transactional sends.

Prerequisites

Setup

1

Get your Resend API key

  1. Sign in at resend.com/api-keys.
  2. Click Create API key.
  3. Name it vly-yourapp.
  4. Set permission to Sending access (limit by domain if you’ve verified one).
  5. Copy the key (starts with re_...).
2

Verify a domain (or skip for testing)

For production, verify the domain you’ll send from:
  1. In Resend, Domains → Add domain (e.g., yourapp.com).
  2. Add the DNS records Resend shows (4–5 records).
  3. Wait for verification (usually under 5 minutes).
For testing, you can use 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

vly creates a Convex action and wires it into the signup flow.

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
vly will set this up if you ask: “Use react-email for the welcome email template.”

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
Register the webhook URL in Resend → Webhooks.

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

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.
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.
Hard bounces hurt your sender reputation. When you get a bounce webhook, mark the address invalid and stop sending.
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

API key is wrong or revoked. Re-check RESEND_API_KEY in your environment variables.
The from address uses a domain you haven’t verified in Resend. Either verify it or send from onboarding@resend.dev for testing.
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.
Free tier is 100/day. For higher volume, upgrade to a paid Resend plan.

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.
Last modified on April 18, 2026