npm.io
1.0.6 • Published 5 years ago

zoho-node-mailer

Licence
ISC
Version
1.0.6
Deps
1
Size
3 kB
Vulns
14
Weekly
0

####Zoho Node Mailer

#####Requirements

  1. Node.js v6 and above.

Uses

Step 1: Install zoho-node-mailer using below command

$ npm install zoho-node-mailer --save

Step 2: Setup your Zoho Transport, with your email and password.

const Emailer = require('zoho-node-mailer');

const credentials = {
    username: 'xyz@domain.com',
	password: 'password'
}
Emailer.UseZohoSMTPTransport(credentials)

var mailOptions = {
    from: 'xyz@domain.com',
    to: 'abc@gmail.com',
    subject: 'Hello, world',
    body: '<h1>This is body</h1>',
    bodyType: 'html'
};
var result = new Emailer.Email(mailOptions)

result.send(function(res){
    console.log(" response : ", res );
})

Keywords