Comprehensive guide to setting up and using the multi-provider email system with analytics and templates.
This SaaS starter kit includes a comprehensive email system that supports multiple providers, email analytics, template management, and automated email sequences.
Support for Resend, SMTP, Brevo, and Postmark with automatic failover
Real-time email tracking, delivery rates, opens, clicks, and performance metrics
Template management with variables, categories, and admin interface
/setup includes a dedicated email configuration step that automatically configures providers, environment variables, and default templates.Modern transactional email service with excellent deliverability.
RESEND_API_KEY="re_your_api_key"Traditional SMTP server support for any email provider.
SMTP_HOST="smtp.gmail.com"Formerly Sendinblue, offers marketing and transactional emails.
BREVO_API_KEY="xkeysib_your_key"Reliable transactional email with high deliverability.
POSTMARK_SERVER_TOKEN="your_token"The email system includes comprehensive analytics to track email performance and user engagement.
Track successful email deliveries
Monitor email open percentages
Track link clicks and engagement
Compare template effectiveness
/admin/email-analytics after setup. The dashboard supports both light and dark themes with real-time data.Manage email templates with variables, categories, and admin interface for easy customization.
Sent to new users upon registration
app_name, user_nameSecure password reset emails
app_name, user_name, reset_link/admin/email-templates. Create new templates, edit existing ones, and organize by categories.Here's how to send emails programmatically using the email service:
import { sendEmail } from '@/lib/email-service';
// Send a welcome email
await sendEmail({
to: 'user@example.com',
template: 'welcome',
variables: {
app_name: 'My SaaS App',
user_name: 'John Doe'
}
});
// Send a password reset email
await sendEmail({
to: 'user@example.com',
template: 'password-reset',
variables: {
app_name: 'My SaaS App',
user_name: 'John Doe',
reset_link: 'https://myapp.com/reset?token=abc123'
}
});