Skip to main content
Better Email is an open-source plugin that brings unified email management to Better Auth. Instead of configuring emails in 8 callbacks, you can centralize everything: one provider, one renderer, lifecycle hooks, and type-safe templates.

Why Better Email?

When implementing Better Auth with full email features, you configure 8 email callbacks in better-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
See the React Email and MJML guides to compare the two main renderers.

Lifecycle hooks

Apply consistent logging and error handling across all email types:

Tag management

Add default tags to every email for analytics and filtering:
Every email automatically gets a { name: 'type', value: ctx.type } tag for filtering by email type.

Custom renderers

Implement the EmailTemplateRenderer 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:
  1. Sign up for a Nuntly account
  2. Complete the account setup
  3. Create an API key with send permissions
  4. Add your sending domain
Once configured, Better Email will handle all Better Auth email delivery through Nuntly with tracking, webhooks, and analytics built in.