2 years ago

#3350

test-img

MdHasib01

Nodemailer Error: Missing credentials for "LOGIN"

I tried to add nodemailer to my node js project but it shows Error: Missing credentials for "LOGIN"

This is my code:

const transporter = nodemailer.createTransport({
  service: "hotmail",
  auth: {
    usre: "abcd@outlook.com",
    pass: "abcd",
  },
});
const options = {
  from: "abcd@outlook.com",
  to: "md.mygmail@gmail.com",
  subject: "sending email form nodemailer",
  text: "This is nodemailer bot",
};

transporter.sendMail(options, function (err, info) {
  if (err) {
    console.log(err);
    return;
  }
  console.log("sent: " + info.response);
});```

node.js

gmail

nodemailer

mailer

0 Answers

Your Answer

Accepted video resources