Add with-email-local-smtp example#95885
Open
tsokolovs wants to merge 1 commit into
Open
Conversation
Add an example showing Auth.js (NextAuth) magic-link email sign in wired to a local SMTP catcher, so email flows can be tested during development without sending real mail. - Nodemailer (email) provider sends the sign-in link to Mailtrap Local, a single-binary MIT-licensed SMTP catcher with a web UI, started via docker-compose (SMTP on 3535, UI on 3550). - Postgres (also in docker-compose) persists Auth.js verification tokens via @auth/pg-adapter; schema is loaded automatically from init.sql. - Includes a small server action to send an arbitrary test email to the catcher so the setup can be verified independently of the auth flow.
tsokolovs
force-pushed
the
examples/with-email-local-smtp
branch
from
July 17, 2026 06:09
fcacb19 to
0c3ed28
Compare
tsokolovs
marked this pull request as ready for review
July 17, 2026 06:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Adds a new example demonstrating Mailtrap Local as the local SMTP catcher with Auth.js (NextAuth) to send a magic-link email sign-in.
Why?
There are many email providers, and if you are working on something before actually using it, you might either run out of free credits or have to start spending money just so that you can test your work. With this local setup it is easy and free to test your emails on your local machine.
How?