And yes, the username and password are correct. I copied and pasted them, even the whole code file over to my prod server and still didn't work.
const nodemailer = require('nodemailer');
const transporter = await nodemailer.createTransport({
service: 'hotmail',
auth: {
user: 'myemail@outlook.com',
pass: 'mypassword'
}
})
let mail = {
from: `myemail@outlook.com`,
to: 'caleb@calebjustice.com',
subject: 'test subject',
text: `testing text`
}
transporter.sendMail(mail).then(resp => {
res.json(resp);
console.log(resp);
}).catch(er => {
res.json(er);
console.log(er);
})