|

楼主 |
发表于 2013-3-29 13:57:17
|
显示全部楼层
站长苏飞 发表于 2013-3-29 13:32 
贴下代码吧。 - tcpClient = new TcpClient(smtpServer, port);
- if (SSL)
- {
- //ssl
- networkStream = new SslStream(tcpClient.GetStream(), true,new RemoteCertificateValidationCallback(ValidateServerCertificate));
- try
- {
- ((SslStream) networkStream).AuthenticateAsClient(smtpServer, null,System.Security.Authentication.SslProtocols.Tls,false);
- }
- catch (Exception ex)
- {
- errmsg = ex.ToString();
- return false;
- }
- }
复制代码 现在报异常网络链接不成功! |
|