Привет, ребята Я пытаюсь отправить электронную почту с моего веб-приложения ASP.Net Я использую это на моем Web.config:ASP.Net C# Отправка E-Mail SMTP Выпуск
<system.net>
<mailSettings>
<smtp>
<network host="smtp.gmail.com" userName="myemail" password="mypass" port="587" enableSsl="true" />
</smtp>
</mailSettings>
и все это правильно, но я получаю сообщение об ошибке:
System.Net.Mail.SmtpException:
The SMTP server requires a secure connection or not done client authentication.
The server response was: 5.5.1 Authentication Required.
Learn more at at System.Net.Mail.MailCommand.CheckResponse
(SmtpStatusCode statusCode, String response) in System.Net.Mail.MailCommand.Send
(SmtpConnection conn, Byte [] command, MailAddress from, Boolean allowUnicode)
in System.Net. Mail.SmtpTransport.SendMail (MailAddress sender, MailAddressCollection
recipients, String deliveryNotify, Boolean allowUnicode,
SmtpFailedRecipientException & exception) in System.Net.Mail.SmtpClient.Send
(MailMessage message) at Account_Registration.Registration()
in c: \ Users \ User \ Documents \ Visual Studio 2013 \ WebSites \
MyWebsite \ Account \ Registration.aspx.cs: line 177
Как вы можете увидеть в моем файле Web.config я позволил Ssl так до сих пор я получаю эту ошибку и электронную почту на мой счет, что кто-то пытался использовать мое электронное письмо без разрешения. Кто-нибудь может помочь?
Возможный дубликат: http://stackoverflow.com/questions/2391079/gmail-c-sharp-web-config-send-mail-works-programmatically-throws-exception –