LaunchFast uses Resend as the email provider for transactional emails (verification codes, password resets, notifications). During development, emails are logged to the terminal instead of being sent.
Development mode
When no RESEND_API_KEY is set, all emails are printed to the terminal. This means you can complete signup, password reset, and other email-dependent flows without any external service during development.
Production setup
- Create a Resend account and generate an API key
- Set the secret on Fly:
fly secrets set RESEND_API_KEY="re_..." --app your-app-name - Add and verify a custom sending domain in Resend (DNS records)
- Update the
fromaddress inapp/utils/email.server.tsto use your verified domain
Configuration
Email sending logic lives in app/utils/email.server.ts. This is where you configure the sender address, customize email templates, and control the development fallback behavior.
Email templates
LaunchFast uses React Email for composing HTML emails with React components. Templates live alongside the email utility and receive data as props, making them type-safe and easy to preview.
Error handling
The sendEmail function returns a result object with either a status: 'success' or status: 'error' with an error message. Always check the result and handle failures gracefully — email delivery is not guaranteed.
Testing with MSW
For automated tests, MSW mocks in test/mocks intercept email API calls so tests run without real service credentials. This keeps tests fast and offline-capable.
Related
- Secrets — managing
RESEND_API_KEYin development and production - Environment variables — full list including
RESEND_API_KEY - Email and password authentication — how email verification works in the signup flow