Why Better Email?
When implementing Better Auth with full email features, you configure 8 email callbacks inbetter-auth 1.7.25: email verification, password reset, email change, account deletion, magic links, email OTP, two-factor codes and organization invitations. Each callback requires its own configuration and email logic.
Better Email consolidates all these callbacks into a single, unified interface with:
- One provider configuration for all email types
- Swappable providers (Nuntly, …)
- Swappable renderers (React Email, MJML, Mustache, plain HTML)
- Type-safe templates with TypeScript validation
- Lifecycle hooks for logging and error handling
- Consistent tag management across all email types
Installation
Quick start with Nuntly provider
Better Auth 1.6 and 1.7 also call
sendVerificationOTP with the change-email type, which email.helpers.otp does not accept in Better Email 1.0.1. For email OTP, write the sendVerificationOTP callback yourself, as shown in the Better Auth email how-to.Available providers
Better Email supports multiple email providers out of the box:Nuntly
Production-ready email delivery with tracking and analytics
Resend
Modern email API for developers
Postmark
Transactional email service
Mailgun
Email delivery and validation
SES
Email service from Amazon Web Services
SMTP
Standard SMTP protocol support
Console
Development mode logging
Available renderers
Choose the template renderer that fits your stack:- React Email: Use React components for email templates
- React MJML: Combine React with MJML for responsive emails
- MJML: Responsive email markup language
- Mustache: Logic-less template engine
- Default HTML: Simple HTML string templates
Lifecycle hooks
Apply consistent logging and error handling across all email types:Tag management
Add default tags to every email for analytics and filtering:{ name: 'type', value: ctx.type } tag for filtering by email type.
Custom renderers
Implement theEmailTemplateRenderer interface for custom template rendering:
Learn more
GitHub repository
View source code and contribute
Announcement post
Read the announcement
Better Auth email how-to
Set up email verification, password reset, email change, email OTP and magic links
Better Auth callbacks
Send Better Auth emails without the plugin
Getting your Nuntly API key
To use Better Email with the Nuntly provider, you need an API key:- Sign up for a Nuntly account
- Complete the account setup
- Create an API key with send permissions
- Add your sending domain
