Before you start
- The Nuntly TypeScript SDK:
npm install @nuntly/sdk. - An API key with send permission, in
NUNTLY_API_KEY. - A verified sending domain for the
fromaddress. Until it is verified, every send fails withdomain_not_verified.
Callbacks
These are the 8 email callbacks of
better-auth 1.7.25. The Better Auth email guide wires the first five and checks them against 1.6.20 and 1.7.25.
Send with the Nuntly SDK
Every callback can call onesendEmail function. Email verification looks like this:
flow tag shows on each email’s page in the Nuntly dashboard and in its webhook events.
advanced.backgroundTasks.handler lets Better Auth respond before the send finishes, so response times don’t reveal which accounts exist. Better Auth’s email docs (read on November 15, 2026) advise against awaiting the send. In Next.js the handler is after. sendMagicLink and the resend endpoint behind authClient.sendVerificationEmail stay awaited whatever the handler (Run the send in the background).
Better Email plugin
Better Email is an open-source Better Auth plugin that replaces these callbacks with one provider and one template renderer. In version 1.0.1:- It registers the email verification and password reset callbacks itself.
- For email change and magic link, pass
email.helpers.changeEmailtosendChangeEmailConfirmationandemail.helpers.magicLinktosendMagicLink. - For email OTP, keep your own
sendVerificationOTPcallback: the plugin’s OTP helper doesn’t accept thechange-emailtype that Better Auth 1.6 and 1.7 send.
Learn more
Better Auth email guide
Email verification, password reset, email change, email OTP and magic links in Next.js
Better Email plugin
One provider and one renderer for every Better Auth email
