Iam trying to send a mail using ASP.NET. When the SMTPClinet.EnableSsl
is set to true, mail is receivable. However, if i开发者_StackOverflow中文版t is set to false, an error is thrown.
Can anyone help me in understanding its need.
I guess that is because the SMTP server generally requires user authentication. And to transfer credential you must use a cryptography model which is in this case the Secure Socket Layer SSL. So, you need to activate SSL.
Refer to the following:
SmtpClient.EnableSsl Property
It depends on the smtp user you are using, ask your administrator about the right configuration including the port and either it requires SSL or not and the right username and password.
精彩评论