I am developing an application in node js, which has functionality of sending email. To do the task I need an SMTP username and password. But I can't find the place where I can get it. I am using the following code to do the operation,
var nodemailer = require('nodemailer');
var transporter = nodemailer.createTransport('smtps://user%40gmail.com:pass@smtp.gmail.com');
var mailOptions = {
from: 'xxx@gmail.com',
to: 'yyy@gmail.com',
subject: 'Hello ✔',
text: 'Hello world ',
html: '<b>Hello world </b>'
};
transporter.sendMail(mailOptions, function(error, info){
if(error){
return console.log(error);
}
console.log('Message sent: ' + info.response);
});
So can anybody help me to view SMTP credentials to send an email.
Thanks in advance