Authentication failed on Office 365 SMTP server

Neel Oza 0 Reputation points
2024-06-27T07:12:12.7033333+00:00

Hello,

Hope you are doing well.

We are experiencing the following error when using the Office 365 SMTP server (Nodejs Nodemailer) to deliver emails.

"Invalid login: 535 5.7.139 Authentication unsuccessful, user is locked by your organization's security defaults policy. Contact your administrator."

Request options: 

{
host: "smtp.office365.com",
  secure: false,
  port: 587,
  tls: {
    ciphers: "SSLv3",
    rejectUnauthorized: false,
  },
  auth: {
    user: USER_EMAIL,
    pass: USER_APP_PASSWORD,
  },
}

Best regards,

Neel  

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
4,309 questions
0 comments No comments
{count} votes