Nodemailer App for Local Testing
How to set up the Nodemailer App to catch emails locally during development.
This document explains how to use the official NodemailerApp for local email development and testing. This setup intercepts emails sent by your application, allowing you to view them in the NodemailerApp interface without sending them to actual recipients.
For a general overview of how email sending works in this application, refer to the General Email Configuration document.
Nodemailer App Setup
- Install & Open NodemailerApp: Download, install, and open the NodemailerApp.
- Create Project: Click the
+
icon in the NodemailerApp sidebar to add a new project. Give it a name (e.g., "My Local Dev"). - Get Server Details: In your new project's sidebar within NodemailerApp, click on "Local server". Note the Port, Username, and Password displayed.
- Set Provider in App: In your application, set the
NEXT_PUBLIC_EMAIL_PROVIDER
environment variable to"nodemailer-app"
. You can do this in your.env
file or via the configuration UI (/configure
). - Set Credentials in App: Configure the following environment variables in your application using the details from step 3:
NODEMAILER_LOCAL_PORT
: Set to the Port from NodemailerApp (e.g.,1025
).NODEMAILER_LOCAL_USER
: Set to the Username from NodemailerApp.NODEMAILER_LOCAL_PASS
: Set to the Password from NodemailerApp. These can also be set in your.env
file or via the configuration UI (/configure
).
Usage
- Run NodemailerApp: Make sure NodemailerApp is running and your project is open.
- Run Application: Start your application (e.g.,
npm run dev
). - Trigger Email: Perform an action in your app that sends an email (e.g., sign up, request password reset).
- View Email: The intercepted email should appear in the NodemailerApp interface for inspection.
Important: This setup is strictly for local development and testing. Do not use "nodemailer-app"
as the NEXT_PUBLIC_EMAIL_PROVIDER
in production environments.
Alternative Tools
While NodemailerApp is the focus of this guide, other local email-catching tools can work if you prefer:
If using an alternative, ensure you configure the NODEMAILER_LOCAL_*
environment variables to match the SMTP settings provided by that tool.