Email
Email Templates
All pre-built email templates and how to add your own.
All templates are defined in lib/services/email-service.ts. Each includes both HTML and plain text versions and uses the app name from config/app.config.ts.
Built-in templates
| Template | Description |
|---|---|
| OTP verification | 6-digit OTP code with a 10-minute expiry notice |
| Welcome | Sent when a new user signs up via OAuth |
| Password reset | Reset link that expires in 1 hour |
| Subscription confirmed | Displays the plan name |
| Subscription canceled | Shows when access expires |
| Email change verification | Verification link sent to the new email (24-hour expiry) |
| Email changed notification | Sent to the old email after a change is confirmed |
| Contact form | Forwards form submissions with reply-to set to the sender |
| Payment failed | Notifies the user with a link to their subscription page |
Adding a new template
Add a new exported function in lib/services/email-service.ts following the same pattern: build HTML and plain text strings, then call sendEmail(). The provider is selected automatically.