I have a VPS in OVH, its ubuntu. I've installed postfix there and I can send email directly from terminal (using mail <addres@host>
).
I'm trying to send email using node.js application and I'm constantly getting Error: Invalid login: 535 5.7.8 Error: authentication failed: authentication failure
Node code:
let transporter = nodemailer.createTransport({
host: 'localhost',
port: 25,
auth: {
user: 'systemUser', - should it be actual linux user?
pass: 'systemUserPassword'
},
tls:{
rejectUnauthorized: false
}
});
transporter.verify(function (error, success) {
if (error) {
console.log(error)
}
else {
console.log("success")
}
})