C# 发送邮件时出错-服务器响应为:5.7.57 SMTP,客户端未通过发送匿名邮件的身份验证

C# 发送邮件时出错-服务器响应为:5.7.57 SMTP,客户端未通过发送匿名邮件的身份验证,c#,asp.net-mvc,email,authentication,C#,Asp.net Mvc,Email,Authentication,在我的应用程序中发送电子邮件以获取放弃的密码时,我遇到了此错误 The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [XXXXXXXXXX.xxxxxxxxx.prod.o

在我的应用程序中发送电子邮件以获取放弃的密码时,我遇到了此错误

The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP; 
Client was not authenticated to send anonymous mail during MAIL FROM [XXXXXXXXXX.xxxxxxxxx.prod.outlook.com]
我提到了以下链接和解决方案

我尝试更改端口,添加域和凭据,将
客户端。UseDefaultCredentials
更改为false,并放置在
凭据的上方

每次都会遇到同样的错误,没有解决办法

请建议是否有人有解决方案


谢谢。

您需要将当前电子邮件地址的注释性设置设置为
中的当前电子邮件从
地址?匿名设置意味着你能解释清楚吗?