3

SSL can either be "explicit" or "implicit" as explained by this link:

http://help.globalscape.com/help/secureserver2/Explicit_versus_implicit_SS.htm

System.Net.Mail only support "explicit" SSL, as explained here:

http://blogs.msdn.com/webdav_101/archive/2008/06/02/system-net-mail-with-ssl-to-authenticate-against-port-465.aspx

So, I'm trying to use System.Net.Mail to connect to an SMTP server that I don't have any control over, and it's failing. How can I know for sure that it's failing because the server wants an "implicit" SSL connection? What test can I do from the client side?

4

1 回答 1

9

Ordinarily this is governed by convention. SMTP running on port 25 (the normal case) uses explicit SSL. SMTPS running on port 465 uses implicit SSL. Mail submission running on port 587 uses explicit SSL.

To tell for sure, telnet to the port, as in "telnet mail.example.com 25". If you see a plain text banner where the server identifies itself, then you are dealing with explicit SSL. If you connect successfully and see nothing, then you are dealing with implicit SSL.

于 2008-10-05T23:44:38.763 回答