为什么在 .NET 中发送邮件时避免使用 CDO?
我们的应用程序使用 System.Net.Mail 从 .NET 发送邮件,其中 遗憾的是,不支持隐式 SSL 服务器。我们正在审查多个支持隐式 SSL 的选项,但我想知道避免使用 CDO 的技术原因是什么?
我知道它已被弃用,建议使用 System.Net.Mail 代替,但如果新版本实际上并不能完成 CDO 所做的所有事情,那么使用旧版 CDO 在技术上有什么问题?
我特别欣赏 CDO 不起作用而 System.Net.Mail 更好的特定情况或示例。
谢谢。
Our application uses System.Net.Mail
to send mail from .NET which unfortunately doesn't support implicit SSL servers. We have several options we're reviewing for supporting implicit SSL but I would like to know what are the technical reasons to avoid using CDO?
I know it's deprecated and the recommendation is to use System.Net.Mail
instead, but if the new version doesn't actually do everything CDO does, what's technically wrong with using the older CDO?
I'd particularly appreciate specific situations or examples when CDO doesn't work and System.Net.Mail
is better.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
应避免使用 CDO,因为它是一种外部依赖项,不随 .NET 一起提供,并且默认情况下不会安装在 Windows 上。几乎可以肯定,它在任何非 Windows 系统上都不可用。
我建议,如果您有可用的工具,就没有理由不使用它。但如果您不需要它,最好不要使用它。
CDO is to be avoided because it is an external dependency that does not ship with .NET and is not installed by default on Windows. It's almost certainly not available on any non-Windows system.
I would suggest that if you have it available, there's no reason not to use it. But if you don't need it, it's better not to use it.