无法通过 Google Cloud Server 上的 Google Workspace Email (Gsuit) 发送电子邮件。 [Asp.Net 与 C# Web 应用程序]

问题描述 投票:0回答:1
<system.net>
      <mailSettings>
      <smtp from="[email protected]" deliveryMethod="Network">
        <network host="smtp.gmail.com" userName="[email protected]" password="*********" port="587" enableSsl="true"/>
      </smtp>
    </mailSettings>
  </system.net>

此代码引发错误:

SMTP 服务器需要安全连接,或者客户端未经过身份验证。服务器响应是:5.7.0 需要身份验证。

根据此我已经应用了所有技巧/代码而不是应用程序密码生成。

我无法在我的 Gsuit 管理面板中找到“应用程序密码生成”选项。

c# asp.net email google-workspace
1个回答
0
投票

为了创建应用程序密码,您必须首先打开 2fa(2 因素身份验证)。

转到您的帐户安全选项卡 https://myaccount.google.com/u/0/security 并点击两步验证

一直到底部,您将看到创建应用程序密码的选项。

© www.soinside.com 2019 - 2024. All rights reserved.