Elmah使用Sendgrid API密钥发送错误邮件

问题描述 投票:0回答:1

通常,我将Web.config文件中的SMTP设置与UN / PW一起使用到我的Sendgrid帐户,以发送elmah错误电子邮件。但是,使用两因素身份验证,我不认为sendgrid允许使用基本身份验证发送电子邮件。有谁知道是否有使用API​​密钥来验证Elmah错误电子邮件的方法?

  <elmah>
    <errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="DefaultConnection" />
    <errorMail from="[email protected]" to="[email protected]" subject="Exception (test)" smtpServer="smtp.sendgrid.net" smtpPort="587" userName="username" password="password" async="true" />
    <security allowRemoteAccess="true" />
  </elmah>

谢谢!

sendgrid elmah
1个回答
0
投票

SendGrid启用了双重身份验证后,不通过基本身份验证提供身份验证。从他们的文档中:

SendGrid不再为用户启用双重身份验证时接受API调用的基本身份验证(用户名和密码)。现在,如果要通过API密钥进行身份验证,则只能使用两因素身份验证。有关更多信息,请参阅身份验证。

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