Docs navigation
Email via Resend
Deprecated — for new destinations use Email — Resend (template).
This original Resend destination (you paste subject + HTML body as templates into LeadRails) is superseded by the template-based email_resend_v2 adapter, where you author and version the email in Resend. Existing destinations of this type keep delivering unchanged and remain supported indefinitely, but we no longer recommend it for new setups. Already set one up? Follow the migration pointer to move to v2.
Send each lead as transactional email through your own Resend account. Developer-first email API with a generous free tier. You bring the API key + sending domain; LeadRails dispatches.
Why you provide your own Resend account
- You own your sending reputation. We'd rather not be the bottleneck on someone else's deliverability — and we'd rather your bounce / complaint history not affect any other LeadRails customer.
- Resend has a developer-friendly free tier (3000 emails/month, 100/day) — perfect for testing before committing to a paid plan.
- Resend has a partner program — [our affiliate link goes here — placeholder for the user to add later].
Sign up for Resend
- Visit https://resend.com → sign up (no credit card required for free tier).
-
Resend lands you on a dashboard with one default domain
(
onresend.com) you can use for testing without verifying.
Verify a real sending domain
The onresend.com test domain works for development but has
limits — for production, verify your own domain:
- Domains → "Add Domain" → enter your sending domain (e.g.
yourdomain.com). -
Add the DNS records Resend prompts for: SPF
(
v=spf1 include:_spf.resend.com ~all), DKIM (DKIM1 selector), optional DMARC. - Wait for DNS propagation (typically 5-30 min) then click "Verify".
- Verified domains let you send from
<anyone>@yourdomain.com.
Get your API key
- API Keys → "Create API Key".
- Pick scope: "Sending access" (recommended) — it's the right scope for a production sending key. LeadRails works fully with a Sending-access key; we'll surface a small notice on the destination explaining the trade-off (we can't preview your template's variables in the editor, but the Send myself a test panel confirms each template renders correctly).
- Use "Full access" only if you want LeadRails to read your template details ahead of time (useful during initial setup to validate variable types in the route mapping editor). You can downgrade to Sending access later — refresh-template will clear the cached details cleanly.
- Optionally restrict to a specific domain — gives you defense in depth if the key leaks.
- Copy the key immediately — starts with
re_followed by an alphanumeric string. - Keys can't be re-shown after creation; if you lose it, create a new one.
Set up your destination in LeadRails
- Sign in → Destinations → New.
- Adapter type:
Email — Resend. - API key: paste your Resend key (starts with
re_). - From address: a verified address (e.g.
leads@yourdomain.com). - From name (optional): displayed in inbox.
- Recipient template:
{{email}}. - Subject template: e.g.
New lead: {{name}}. - HTML body template: Mustache-style variables substituted at delivery time. Single-line for now (multi-line input not yet supported).
- Plain-text body (optional).
-
Reply-to (optional): a different address for replies (e.g.
support@yourdomain.comwhile sending fromleads@yourdomain.com). - Click Create.
Available variables
Top-level lead fields ({{name}},
{{email}}, {{phone}},
{{utm_source}}, etc.) plus nested access
({{lead.email}}, {{event.event_id}}).
Missing vars resolve to empty string.
Verify connection
- Open the destination → Advanced → Verify connection.
- LeadRails hits Resend's
/domainsendpoint with your key. - 200 = key works; 401 = invalid key.
Send a test email
- Sources → your source → Settings → ensure a route exists to your Resend destination.
- Click "Send test event".
- Email lands in the recipient inbox within seconds.
- Resend's Logs tab shows the message + delivery status.
Troubleshooting
401- API key wrong or revoked.
422+"validation_error"-
Most often: the from_address is on an unverified domain. Go to
Resend → Domains and verify. LeadRails surfaces this as a
destination_config_failedalert. 422+"email_invalid"- Recipient email format is malformed (e.g. missing
@). 403- API key scope is too narrow for the operation. Re-create with broader scope.
- Domain verification stuck on "Pending"
-
DNS hasn't propagated. Use
dig TXT yourdomain.comto check; allow up to a few hours for stubborn DNS.
Your responsibilities
- You are the sender. Anti-spam laws (CAN-SPAM US, CASL Canada, GDPR EU) are yours.
- Lead-routing emails are typically transactional (specific to a person who just gave you their info) — generally lower compliance bar than marketing.
- Wire Resend's Bounce + Complaint webhooks to your own backend to handle suppressions cleanly.