Awesome Open Source
Awesome Open Source

express-smtp-mailer

Build Status Maintained MIT license

v1.2.0 release notes

Efficient & Secure Node Server -- Built with Express, Nodemailer, and Gmail

Multi-Process Design, HTML FileType Priority, Middleware AJAX Parsing

Integrated SMTP Mail Delivery For Contact Forms, Subscriptions, etc

Open Source? Yes!

VIEW FULL TUTORIAL

Installation

git clone this repository

cd express-smtp-mailer to enter root directory

npm install to acquire the node_modules

code . to open VS Code (or your favorite editor)

Configuration

create a new .env file in the root directory

use the process.env variables defined in the .env.example and routes.js files to setup authentication

for production, use the credentials of the recipient account

process.env.SMTP_TO_EMAIL=''

process.env.SMTP_TO_PASSWORD=''

for development and testing, create an Ethereal account and enter the credentials of the testing account (if desired)

process.env.SMTP_DEV_EMAIL=''

process.env.SMTP_DEV_PASSWORD=''

Testing

go back to the terminal and run node server

it should print out the following lines

Node dev server: listening on port 5000

Ready to send mail!

verify full functionality by replacing the '/example/frontend.js' dirpath in routes.js and server.js with your own API routes

Success

and there you have it!

a deployment-ready express smtp mail server


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Javascript (1,552,087
Nodejs (54,538
Expressjs (7,141
Backend (3,367
Nodemailer (354
Smtp Server (162
Related Projects