Hi,
I need SMTP AUTH enabled for my account ******@hotmail.com to send emails from my desktop application
i am getting the following error even if i use 2FA and app password
all things are ok but getting the following error
System.Net.Mail.SmtpException HResult=0x80131500 Message=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. [DX0P273CA0082.AREP273.PROD.OUTLOOK.COM 2026-05-24T09:58:46.966Z 08DEB9496484FCE2] Source=System.Net.Mail StackTrace: at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response) at System.Net.Mail.MailCommand.EndSend(IAsyncResult result) at System.Net.Mail.SendMailAsyncResult.SendMailFromCompleted(IAsyncResult result) --- End of stack trace from previous location --- at System.Net.Mail.SendMailAsyncResult.End(IAsyncResult result) at System.Net.Mail.SmtpClient.SendMailCallback(IAsyncResult result) --- End of stack trace from previous location --- at TestEmailByWaleed.MainWindow.<SendEmailAsync>d__7.MoveNext() in C:\Users\Terhana\source\repos\TestEmailByWaleed\TestEmailByWaleed\MainWindow.xaml.cs:line 134 This exception was originally thrown at this call stack: [External Code] TestEmailByWaleed.MainWindow.SendEmailAsync(string, string, string) in MainWindow.xaml.cs
Regards
Waleed