Emails in the Next.js Supabase SaaS Starter Kit
Learn how to configure email providers, send transactional emails, and customize email templates in your MakerKit application using React Email and Nodemailer or Resend.
MakerKit provides a complete email system with two distinct types of emails: application emails (team invitations, account notifications) and Supabase Auth emails (verification, password reset). Each requires separate configuration.
Email System Overview
The email architecture in MakerKit consists of:
- Mailer Package (
@kit/mailers): A provider-agnostic abstraction that supports Nodemailer (SMTP) and Resend (HTTP API) - Email Templates (
@kit/email-templates): React Email-based templates with i18n support - Supabase Auth Templates: HTML templates for authentication flows, stored in
apps/web/supabase/templates
Quick Start
For most applications, you need to:
- Configure your email provider - Set environment variables for Nodemailer (SMTP) or Resend
- Set up Supabase Auth emails - Replace default templates with MakerKit's token-hash templates
- Send transactional emails - Use the
@kit/mailerspackage in your server-side code
Documentation
- Email Configuration - Set up Nodemailer or Resend as your email provider with proper SMTP credentials
- Sending Emails - Use the mailer API to send plain text and HTML emails from server-side code
- Email Templates - Create branded email templates with React Email and i18n support
- Authentication Emails - Configure Supabase Auth email templates for PKCE-compatible verification flows
- Custom Mailer - Integrate third-party email providers like SendGrid, Postmark, or AWS SES
- Local Development with Mailpit - Test emails locally using Mailpit without sending real messages