将"SmtpClient.EnableSsl"设置为true的"System.Net.Mail.SmtpClient"需要哪些端口?

编程入门 行业动态 更新时间:2024-10-26 14:39:20
本文介绍了将"SmtpClient.EnableSsl"设置为true的"System.Net.Mail.SmtpClient"需要哪些端口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

如标题所示,将"SmtpClient :: EnableSsl"设置为true的"System :: Net :: Mail :: SmtpClient"需要哪些端口?

As the title says, what ports does an 'System::Net::Mail::SmtpClient' need with 'SmtpClient::EnableSsl' set to true?

EnableSsl属性上的文档说,替代连接方法的默认端口为465,但未提及支持支持的连接类型所使用的端口.

The documentation on the EnableSsl property says the default port for an alternative connection method is 465 but doesn't mention what's used for the connection type it does support.

编辑-如果有所作为,则在这种情况下我将连接到Gmail,但欢迎使用通用答案.

Edit - If it makes a difference, I'm connecting to Gmail in this instance but generic answers would be welcome.

推荐答案

对Wireshark的快速测试表明,答案默认为端口25

A quick test with Wireshark suggested that the answer is port 25 by default

客户端使用STARTTLS重新使用最初未加密的链接以随后发送加密的数据.

The client uses STARTTLS to re-use an initially unencrypted link to subsequently send encrypted data.

更多推荐

将"SmtpClient.EnableSsl"设置为true的"System.Net.Mail.SmtpClient"需

本文发布于:2023-11-07 14:55:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1566754.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:设置为   端口   SmtpClient   EnableSsl   quot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!