✅ SMTP server broke

We used to be able to connect using SMTP outlook.office365.com 587 but all of a sudden it no longer will connect. Error
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 Client not authenticated to send mail. Error: 535 5.7.139 Authentication unsuccessful, basic authentication is disabled. [MW4PR04CA0249.namprd04.prod.outlook.com 2024-10-16T23:46:33.247Z 08DCEE0C14048537]
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 Client not authenticated to send mail. Error: 535 5.7.139 Authentication unsuccessful, basic authentication is disabled. [MW4PR04CA0249.namprd04.prod.outlook.com 2024-10-16T23:46:33.247Z 08DCEE0C14048537]
My Code
client = new SmtpClient("outlook.office365.com", 587);

client.Timeout = 20000;

client.EnableSsl = true;

client.DeliveryMethod = SmtpDeliveryMethod.Network;

client.UseDefaultCredentials = false;

client.Credentials = new System.Net.NetworkCredential("username", "password");
client = new SmtpClient("outlook.office365.com", 587);

client.Timeout = 20000;

client.EnableSsl = true;

client.DeliveryMethod = SmtpDeliveryMethod.Network;

client.UseDefaultCredentials = false;

client.Credentials = new System.Net.NetworkCredential("username", "password");
2 Replies
Jimmacle
Jimmacle3mo ago
Deprecation of Basic authentication in Exchange Online
Learn about deprecation of Basic authentication in Exchange Online
Unknown User
Unknown User3mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server