SMTP 服务器需要安全连接或客户端未通过身份验证. [英] The SMTP server requires a secure connection or the client was not authenticated.

查看:77
本文介绍了SMTP 服务器需要安全连接或客户端未通过身份验证.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 asp 中的createuserwizard"创建一个表单.这是我的代码.

I am creating a form using "createuserwizard" in asp.This is my code.

<asp:CreateUserWizard ID="userwizard" ContinueDestinationPageUrl="~/secretfiles/secret.aspx" runat="server" >
    <MailDefinition BodyFileName="register.txt" Subject="Registration Confirmation" From="amrit.enest@gmail.com" />
    </asp:CreateUserWizard>

这是我的 web.config 文件设置.

This is my web.config file settings.

 <mailSettings>
      <smtp deliveryMethod="Network" from="amrit.enest@gmail.com">
        <network host="smtp.gmail.com" port="25" userName="amrit.enest@gmail.com" password="sending emails's password" />
      </smtp>
    </mailSettings>

然后设置了一个 Smtp.在 ISS 设置中我选择了以下选项.

Then settled up a Smtp .in ISS settings i selected following options.

->Use localhost(SMTP)
->port=25
->authentication not required 

现在当一个新用户点击提交按钮时,它会给出以下错误消息并且邮件没有被发送.

Now when a new user click submit button ,it gives following error message and mail is not being send.

SMTP 服务器需要安全连接或客户端未通过身份验证.服务器响应是: 5.7.0 必须首先发出 STARTTLS 命令.ud8sm21095949igb.4

请大家帮忙.

推荐答案

使用enableSsl="true",像这样:

 <mailSettings>
  <smtp deliveryMethod="Network" from="amrit.enest@gmail.com">
    <network enableSsl="true" host="smtp.gmail.com" port="25" userName="amrit.enest@gmail.com" password="sending emails's password" />
  </smtp>
</mailSettings>

这篇关于SMTP 服务器需要安全连接或客户端未通过身份验证.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆