email-sender-npm node js
How to use this package
- first you are install this package
- secand create a dotenv file on your root folder
- third inside dotenv you will create two variable like EMAIL="enter your email" PASSWORD="enter your email password
- forth create a file emailSend.js
- five import this package top of your file
the process are : |
---|
- create a .env file on your root project
PASSWORD EMAIL
PASSWORD="your email password"
EMAIL="enter your email"
- next step create a emailSend.js file
code:
Sender.sendEmail("from", "to", "your otp", "otp is 7890", "write some html code")
code:
const { Sender } = require('email-sender-npm')
require('dotenv').config()
Sender.sendEmail("from@gmail.com", "to@gmail.com", "email send test", "nice", "<h1>hello world<h1/>")