Skip to content

A demonstration for Nodemailer 3rd party usage in Node.js applications

Notifications You must be signed in to change notification settings

issei416/Nodemailer-Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NODEMAILER Demo

This project gives you a demonstration on a very useful 3rd party package for nodeJs known as nodemailer. nodemailer is a module for Node.js applications to allow easy email sending.

visit the official nodemailer website for more details on this module

Installation

npm i nodemailer

Usage

  • Create transporter
    const transporter = nodemialer.createTransporter({
      service:"gmail", //for gmail
      auth:{
          user:"YOUR EMAIL",
          pass:"your PASS-KEY from .env" //use gooogle 2 step verification generated password
      }
    }); 
    
  • Send mail with details
    transporter.sendMail(details,() => {}) // details has from,to,subject,body of the mail and use callback function to resolve the returned promise
    

About

A demonstration for Nodemailer 3rd party usage in Node.js applications

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published