iam using nodemailer to sent an email but it only working for email not for gmail
// this is config connections
"nodemailer" : {
"host": "xxx.xxxxx.com",
"port": 587,
"secure":true,
"auth": {
"user": "myuser.com",
"pass": "password"
} ,
"tls": {
"rejectUnauthorized": false,
"minVersion": "TLSv1"
},
"debug":true,
"logger":true
},
"receivingEmail": {
"feedbackemail" : "abcd@gmailcom",
"contactemail" : "abcdef@gmail.com"
}
//nodemailer configurations
const transporter = nodemailer.createTransport((config["nodemailer"]));
var mailOptions = {
from: `${config["nodemailer"]["user"]}`,
to: tomail,
subject: subject ,
text: data
};
transporter.verify(function(error, success) {
if (error) {
console.log(error,"17");
} else {
console.log("Server is ready to take our messages");
}
});
transporter.sendMail(mailOptions, function(error, info){
if (error) {
console.log(error);
} else {
console.log('Email sent: ' + info.response);
}
});
here iam sending an email but couldn't able to send gmail accounts Nodemailer 6.1.1 not working with NodeJs >=12 i tried this.. could you suggest me where is the mistake?