Setting Up Transactional Email with Resend
Configure Resend for transactional email delivery, verify your domain, and customize the included email templates.
On this page
Get a Resend API Key
- Create a free account at resend.com. The free tier allows 3,000 emails/month and 100 emails/day, which is enough for development and early production use.
- In the Resend dashboard, go to API Keys → Create API Key.
- Give the key a name (e.g., "LaunchSaaS Production") and set permissions to "Full access" or "Sending access."
- Copy the key — it starts with
re_. You will not be able to see it again. - Add it to your environment variables:
RESEND_API_KEY=re_...
In Vercel, add this under Settings → Environment Variables → Production.
Email Templates Included
LaunchSaaS ships with production-ready HTML email templates for every transactional email your SaaS needs to send:
| Template | When it's sent | File |
|---|---|---|
| Welcome | After successful signup | emails/welcome.tsx |
| Password reset | When user requests password reset | emails/password-reset.tsx |
| Magic link | When user requests passwordless login | emails/magic-link.tsx |
| Team invitation | When invited to a workspace | emails/team-invite.tsx |
| Payment confirmation | After successful Stripe payment | emails/payment-confirmed.tsx |
| Payment failed | When Stripe payment fails | emails/payment-failed.tsx |
Templates are built with React Email — JSX components that render to email-compatible HTML. They work correctly in Gmail, Apple Mail, Outlook, and major email clients.
Verify Your Domain
Without a verified domain, emails send from onboarding@resend.dev. For production, set up your own domain so emails come from noreply@yourapp.com or similar.
- In the Resend dashboard, go to Domains → Add Domain.
- Enter your domain (e.g.,
yourapp.com). - Resend provides DNS records to add at your registrar. You need to add:
- An SPF record (TXT): tells receiving servers that Resend is authorized to send for your domain
- A DKIM record (TXT): cryptographically signs your emails
- Optional: a DMARC record for additional protection against spoofing
- Add the records at your domain registrar (GoDaddy, Cloudflare, Namecheap, etc.).
- DNS propagation takes 5 minutes to 48 hours. Resend shows verification status in the dashboard.
- Once verified, update the
fromaddress inlib/email/config.ts.
Deliverability tip
Add a DMARC record even if Resend does not strictly require it. A DMARC policy prevents your domain from being used in phishing emails and improves deliverability to Gmail and Outlook. Start with p=none (monitoring mode) and upgrade to p=reject once you have confirmed your legitimate email streams are covered.
Customizing Templates
Email templates are React components in the emails/ directory. Each accepts typed props for variable content (user name, action URL, etc.).
Preview templates locally
npm run email:preview
This starts a local server at http://localhost:3030 where you can preview all email templates with live reload.
Change the from address and name
Update lib/email/config.ts:
export const emailConfig = {
from: 'Your App ',
replyTo: 'support@yourapp.com',
};
Update template content
Edit the JSX in any file under emails/. The templates use standard HTML attributes for email compatibility. Avoid CSS properties that are not supported in email clients (e.g., flexbox, grid). React Email's built-in components handle cross-client compatibility.
Testing Email Delivery
To test that your Resend setup is working, trigger an email from your app (e.g., sign up with a test account or use the Resend dashboard's send test feature).
You can also test directly from the terminal:
curl -X POST 'https://api.resend.com/emails' \
-H 'Authorization: Bearer re_YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{
"from": "Test ",
"to": ["your@email.com"],
"subject": "Test email",
"html": "This is a test.
"
}'
A successful response has status 200 and includes an email ID. Check the Resend dashboard under Emails to see delivery status.
Frequently Asked Questions
What email templates does LaunchSaaS include out of the box?
LaunchSaaS includes HTML email templates for: welcome email (sent after signup), password reset, magic link login, team workspace invitation, payment confirmation, and payment failure notification. All templates are responsive and render correctly in major email clients.
Do I need to verify a domain with Resend to send emails from LaunchSaaS?
Yes, for production use. Without a verified domain, emails send from Resend's shared domain and may land in spam. Verifying your own domain requires adding SPF and DKIM DNS records at your registrar. Resend's dashboard provides the exact DNS values.
Can I test email sending locally without a verified domain?
Yes. Resend's free tier allows sending to any email address using their shared domain. This works fine for local development — emails land in your inbox with a resend.dev sender address. You only need a verified domain when you want emails to come from your own domain in production.
How do I change the from address and sender name for LaunchSaaS emails?
The from address and sender name are configured in lib/email/config.ts. Change the from field to your verified domain email (e.g., 'Your App <noreply@yourapp.com>'). The domain in the from address must match a verified domain in your Resend account.
Does LaunchSaaS send emails directly or queue them?
LaunchSaaS sends emails directly via the Resend API without a queue. Resend handles retry logic internally. For most SaaS applications, direct sends are sufficient. If you need guaranteed delivery with retry visibility, you can add a queue in front of the email functions, but this is not required.
How do I customize the HTML in LaunchSaaS email templates?
Email templates are in emails/ and built with React Email components. Each template is a React component that renders to HTML. Edit the JSX to change layout, text, colors, and links. Run npm run email:preview to preview the rendered HTML in a browser before deploying.
Ready to ship
Skip the boilerplate. Ship your product.
14 production packages. 2,335 tests. Battle-tested by 13,000+ users. One-time payment. Lifetime access.
Get Instant Access — $99