我在asp中使用「createuserwizard」創建表單。這是我的代碼。SMTP服務器需要安全連接或客戶端未通過身份驗證。
<asp:CreateUserWizard ID="userwizard" ContinueDestinationPageUrl="~/secretfiles/secret.aspx" runat="server" >
<MailDefinition BodyFileName="register.txt" Subject="Registration Confirmation" From="[email protected]" />
</asp:CreateUserWizard>
這是我的web.config文件中的設置。
<mailSettings>
<smtp deliveryMethod="Network" from="[email protected]">
<network host="smtp.gmail.com" port="25" userName="[email protected]" password="sending emails's password" />
</smtp>
</mailSettings>
然後解決了我選擇的下列選項中的Smtp.in ISS設置。
->Use localhost(SMTP)
->port=25
->authentication not required
現在,當新用戶點擊提交按鈕,它提供了以下錯誤消息和郵件不會被髮送。
SMTP服務器需要安全連接或客戶端未通過身份驗證。服務器響應是:5.7.0必須首先發出STARTTLS命令。 ud8sm21095949igb.4
請幫幫忙。
那麼無論你的密碼不正確,或者你可以,我不t知道 - 使用安全的smtp端口465 – t3hn00b 2012-08-03 12:14:20