简体   繁体   English

SMTP 服务器需要安全连接或客户端未通过身份验证。(535 5.7.3)?

[英]The SMTP server requires a secure connection or the client was not authenticated.(535 5.7.3)?

I am totally fed-up with Office 365 SMTP configuration, I have done all requirements to send email using my account on Office 365, and always giving me the same error message:我完全厌倦了 Office 365 SMTP 配置,我已经完成了使用我在 Office 365 上的帐户发送 email 的所有要求,并且总是给我相同的错误消息:

The SMTP server requires a secure connection or the client was not authenticated. SMTP 服务器需要安全连接或客户端未通过身份验证。 The server response was: 5.7.57 Client not authenticated to send mail.服务器响应为:5.7.57 客户端未通过身份验证以发送邮件。 Error: 535 5.7.3 Authentication unsuccessful [DX0P273CA0007.AREP273.PROD.OUTLOOK.COM 2023-06-01T20:34:23.527Z 08DB62D998FCDD7E]错误:535 5.7.3 身份验证不成功 [DX0P273CA0007.AREP273.PROD.OUTLOOK.COM 2023-06-01T20:34:23.527Z 08DB62D998FCDD7E]

  • I have used direct password and did not work我使用了直接密码但没有用
  • Used App password and activating the MFA and did not work.使用了 App 密码并激活了 MFA,但没有用。

the below code is used for sending the email which I don't think it has any issue下面的代码用于发送 email,我认为它没有任何问题

 SmtpClient smtpClient = new SmtpClient("smtp.office365.com", 587);
        smtpClient.EnableSsl = true;
        smtpClient.UseDefaultCredentials = false;
        smtpClient.Credentials = new NetworkCredential("hajjaj@alhajjaji.com", "*******");

        // Set up the email message
        MailMessage mailMessage = new MailMessage();
        mailMessage.From = new MailAddress("hajjaj@alhajjaji.com");
        mailMessage.To.Add("hajjaj@gmail.com");
        mailMessage.Subject = EmailSubject;
        mailMessage.Body = EmailMsg;
        mailMessage.IsBodyHtml = true;
        smtpClient.Send(mailMessage);

Application password is added as you can see如您所见,已添加应用程序密码在此处输入图像描述

SMTP is enabled for that Mailbox also还为该邮箱启用了 SMTP 在此处输入图像描述

SMTP Disabled status: not disabled SMTP 禁用状态:未禁用在此处输入图像描述 any help will be very apricated.任何帮助都会非常有用。 thanks谢谢

For smtp.office365.com to work, you need to do the following:要使smtp.office365.com正常工作,您需要执行以下操作:

  1. Login into the Microsoft 365 Admin Center as an admin user.以管理员用户身份登录 Microsoft 365 管理中心。
  2. Click Azure Active Directory in the menu.单击菜单中的 Azure Active Directory。 If the option is not visible, click Show All.如果该选项不可见,请单击“全部显示”。 See image #1.参见图片 #1。
  3. In the Azure Active Directory , click Properties on the page.Azure Active Directory中,单击页面上的属性 See Image #2参见图片#2
  4. At the bottom of the page, click Manage security defaults .在页面底部,点击Manage security defaults
  5. Turn it off and answer why you are turing it off, then click Save.将其关闭并回答您关闭它的原因,然后单击“保存”。 # See image #3 # 见图片#3
  6. Test your email code.测试您的 email 代码。

Image #1图片#1 在此处输入图像描述

Image #2图片 #2 在此处输入图像描述

在此处输入图像描述

BTW, make sure you are using .NET Framework 4.8 or later and user's office 365 MFA option is disabled.顺便说一句,请确保您使用的是 .NET Framework 4.8 或更高版本,并且禁用了用户的 office 365 MFA 选项。

Sounds like the SMTP authentication of your Office 365 account hasn't been enabled.听起来您的 Office 365 帐户的 SMTP 身份验证尚未启用。 The third-party application uses SMTP submission to authenticate Office 365 account.第三方应用使用SMTP提交验证Office 365账号。 To enable the SMTP auth, you can refer to the Enable or disable authenticated client SMTP submission (SMTP AUTH) in Exchange Online article.要启用 SMTP 身份验证,您可以参考在 Exchange Online 中启用或禁用经过身份验证的客户端 SMTP 提交 (SMTP AUTH) 一文。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 SMTP 服务器需要安全连接或客户端未通过身份验证。 如果上传到godaddy - The SMTP server requires a secure connection or the client was not authenticated. if uploading on godaddy SMTP服务器需要安全连接或客户端未经过身份验证。 - The SMTP server requires a secure connection or the client was not authenticated. SMTP服务器需要安全连接,或者客户端未通过身份验证。 - The SMTP server requires a secure connection or the client was not authenticated. SMTP 服务器需要安全连接或客户端未通过身份验证。 服务器响应为:5.7.57 SMTP; Office 365 错误 - The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP; Office 365 error 出现错误:SMTP 服务器需要安全连接或客户端未通过身份验证。 服务器响应为:5.7.57 SMTP - Getting error : The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP SMTP 服务器需要安全连接或客户端未通过身份验证。 服务器响应为:5.7.57 SMTP; - The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP; 如何修复 GMail SMTP 错误:“SMTP 服务器需要安全连接或客户端未通过身份验证。” - How to fix GMail SMTP error: "The SMTP server requires a secure connection or the client was not authenticated." c# SMTP 服务器需要安全连接或客户端未通过身份验证。 服务器响应为:5.7.0 需要身份验证 - c# The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Authentication Required SMTP服务器需要安全连接,或者客户端未通过身份验证。 服务器响应为:5.5.1需要身份验证 - SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required SMTP服务器需要安全连接,或者客户端未通过身份验证。 服务器响应为:5.5.1需要身份验证。?8 - The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.?8
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM