Setup automated emails with Plunk
DO NOT upgrade any Plunk dependencies unless you’re following their official migration guide and understand the breaking changes. Upgrading without proper migration can break your email sending functionality and template rendering. The current Plunk version in the boilerplate is tested and stable.
This guide covers working with email sending using Plunk in Titan.
Titan includes a complete email infrastructure that allows you to send transactional and marketing emails to your users. The system uses Plunk, a modern email service that provides beautiful email templates, reliable delivery, and detailed analytics.
You can test email functionality in your local development environment.
Set config.email.enabled
to true
in config.ts
Add your Plunk API key to your app’s environment variables
Create email templates
a. In the Plunk dashboard, go to ‘Templates’
b. Create templates for each type of email you need (welcome, password reset, notifications, etc.)
c. Note the template IDs for each template you create
Run your app
Test sending emails
You can test sending emails using the provided utility functions:
config.email.enabled
is set to true
in your configFor transactional emails, always provide a clear way for users to manage their email preferences or unsubscribe.