Issue in SMTP Package - Unable to send an smtp email through Microsoft office 365 outlook

Rajesh Rai 0 Reputation points
2024-09-02T08:47:11.9633333+00:00

We are encountering issues with the System.Net.Mail namespace while using.NET Core. We are using the settings for sending emails through SMTP, however, we are getting an error message that says:

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, SmtpClientAuthentication is disabled for the Mailbox. Visithttps://aka.ms/smtp_auth_disabledfor more information. [SN7PR04CA0176.namprd04.prod.outlook.com 2024-07-23T09:26:48.348Z 08DCA6DE59C0EC4A] System.Net.Mail.SmtpException: 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, SmtpClientAuthentication is disabled for the Mailbox. Visithttps://aka.ms/smtp_auth_disabled for more information. [SN7PR04CA0176.namprd04.prod.outlook.com 2024-07-23T09:26:48.348Z 08DCA6DE59C0EC4A]

We have contacted the Outlook 365 Team regarding this issue, and they believe it is an SMTP package problem. Can anyone help us with this issue?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,524 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AgaveJoe 28,051 Reputation points
    2024-09-02T10:14:10.4466667+00:00

    My guess is the authentication error is due Microsoft disabling basic authentication. Please see the official documentation.

    Deprecation of Basic authentication in Exchange Online


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.