Nodemailer was working correctly for a few months with exactly the same configuration.
var smtpTransport = nodemailer.createTransport({
service: "Zoho",
auth: {
user: environment.smtp.email,
password: environment.smtp.password
},
secure: false,
tls: {
rejectUnauthorized: false
}
});
var mailOptions = {
from: environment.smtp.email,
to: '[email protected]',
subject: 'Subject',
html: "Mail content here."
}
smtpTransport.sendMail(mailOptions, function(error, response){
console.log(error)
});
It throw " Missing credentials for "PLAIN" ". I have used this config in many places in the app and now it throw this error everywhere. But was working well when I have write the code first time.
"nodemailer": "^4.0.1"
Here is the config settings. The 'host' field was missing and it seems to be mandatory in the Nodemailer V3 and above.
https://nodemailer.com/smtp/
var smtpTransport = nodemailer.createTransport({
host: "smtp.zoho.com",
service: "Zoho",
port: 25,
secure: false,
auth: {
user: '[email protected]',
pass: "123456"
},
tls: {
rejectUnauthorized: false
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With