Transactional email in Fast Unicorn is currently backed by Resend.
Email is treated as an infrastructure feature rather than a route concern, which keeps delivery settings, sender identity, and email-triggering flows easier to manage over time.
Need setup steps?
This page explains the email feature at a high level. For implementation details, continue with Configure Resend.
What this feature includes
Provider configuration
Delivery depends on environment validation and a configured sender identity instead of being embedded directly into page code.
Flow integration
Transactional emails are triggered by auth and billing-related flows that need communication outside the browser.
Operational checks
Domain verification, sender setup, and branded content all matter before production email can be considered reliable.
Main files and folders
- src/config/site.ts: Sender identity and brand-facing email details.
- src/env.js: Required environment validation for email delivery.
- src/server/api/routers/emails.ts:
"use server"module with server actions for sending emails (not a tRPC router). - src/server/api/routers/customAuth.ts: Auth-triggered email flows such as recovery.
- src/components/emails/: Email templates —
welcome.tsx,code.tsx,TokenEmailValidation.tsx,EmailPassChangeTemplate.tsx,PurchaseConfirmationTemplate.tsx.
Current role of email
Email supports flows that need user communication outside the browser, especially:
- welcome emails
- recovery code delivery
- password change confirmation
- purchase confirmation
- token validation
The five email templates live in src/components/emails/ and are sent through server actions in src/server/api/routers/emails.ts.
That makes email a shared application capability rather than a single isolated feature.
Sender configuration
The sender is configured in src/config/site.ts as resendEmail.
This should always point to a verified sender in your Resend account.
Integration boundary
The template keeps provider configuration separate from the route UI so email delivery can evolve without rewriting page components.
This is especially important when delivery providers, email templates, or sender policies change over time.
Operational advice
Before going live:
- verify the sending domain
- confirm localized messaging is correct
- test recovery and purchase-related email flows
- make sure branding in the email content matches
siteConfig
Production mindset
Email is only fully ready when delivery, branding, localization, and real inbox behavior have all been verified together.