开发者

ASP.NET Mailing: Usage of SMTPClient.EnableSsl

开发者 https://www.devze.com 2023-03-04 03:05 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消