Example of how to send HTML Emails in NodeJs with Nodemailer.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
emails/example
public
views
.gitignore
README.md
app.js
package-lock.json
package.json
server.js

README.md

Example of how to send HTML Emails in NodeJs with Nodemailer.

Usage

npm install
npm run start

After the start, open http://localhost:3000 and you should find the simple form.

HTMl Email Preview

Fill out the form and submit. You should receive a simple HTML email.

HTMl Email Preview

This example use the Stream Transport for testing.

Use SMTP transport for delivering messages in the production environment.

const transporter = nodemailer.createTransport({
  host: 'smtp.example.com',
  port: 587,
  auth: {
    user: 'username',
    pass: 'password'
  }
});