net:包含。邮件vs System.Net.Mail

时间:2022-09-24 08:25:11

I am considering converting a project that I've inherited from .net 1.1 to .net 2.0. The main warning I'm concerned about is that it wants me to switch from System.Web.Mail to using System.Net.Mail.

我正在考虑将我从。net 1.1继承的项目转换为。net 2.0。我担心的主要警告是它希望我从System.Web切换。邮件使用System.Net.Mail。

I'm not ready to re-write all the components using the obsolete System.Web.Mail, so I'm curious to hear if any community members have had problems using it under .net 2.0?

我还没有准备好使用过时的System.Web重新编写所有组件。邮件,所以我很想知道在。net 2.0下是否有社区成员有问题?

7 个解决方案

#1


99  

System.Web.Mail is not a full .NET native implementation of the SMTP protocol. Instead, it uses the pre-existing COM functionality in CDONTS. System.Net.Mail, in contrast, is a fully managed implementation of an SMTP client.

包含。邮件不是SMTP协议的。net本机实现。相反,它在CDONTS中使用已有的COM功能。System.Net。相反,Mail是一个SMTP客户端的完全管理实现。

I've had far fewer problems with System.Net.Mail as it avoids COM hell.

我在System.Net上遇到的问题要少得多。邮件,因为它避免COM地狱。

#2


7  

Biggest issue with System.Net.Mail is that it has no support for Implicit SSL. Use System.Web.Mail until you don't have a need for Implicit SSL support.

最大的问题与System.Net。Mail是它不支持隐式SSL。使用包含。邮件,直到您不需要隐式SSL支持。

#3


5  

here are 2 sites that provide documentation and samples for both

这里有两个提供文档和示例的站点

http://www.systemwebmail.com/

http://www.systemwebmail.com/

http://www.systemnetmail.com/

http://www.systemnetmail.com/

#4


4  

The few times I ran into this, I found that that the methods and properties were all almost identical- changing the object type was just about all I had to do. There were one or two other little things, but they showed up with the lines and it was obvious what to do with Intellisense. I'd vote for going with the fully managed solution, get away from cdonts as soon as possible. It's not even installed on 03 server and newer.

有几次我遇到这种情况,我发现方法和属性几乎都是一样的——更改对象类型几乎就是我要做的所有事情。还有一两件小事情,但是它们出现了,而且很明显,如何使用智能感知。我会投票支持完全管理的解决方案,尽快离开cdonts。它甚至没有安装在03服务器上。

#5


4  

System.Web.Mail is deprecated, but should still work. You'll be annoyed with warnings about it being obsolete, but the functionality still carries on... for the time being.

包含。邮件已弃用,但仍应工作。您可能会对有关它已经过时的警告感到恼火,但是这个功能仍然在继续……目前。

I would agree with others that the conversion to System.Net.Mail was very trivial. I doubt you'd have to re-write more than a line or two.

我同意其他人对System.Net的转换。邮件很琐碎。我想你不需要再写一两行了。

#6


0  

Yes, we had the same issue, and we decided not to upgrade either. We haven't seen any problems, so you're OK ignoring the warnings.

是的,我们也有同样的问题,我们也决定不升级。我们没有看到任何问题,所以你可以无视警告。

#7


0  

We had implemented .netmail it was working at the beginning now is requiring username and password. So we went back to webmail as is working OK.

我们已经实现了。netmail,它在开始工作时需要用户名和密码。所以我们回到了webmail。

#1


99  

System.Web.Mail is not a full .NET native implementation of the SMTP protocol. Instead, it uses the pre-existing COM functionality in CDONTS. System.Net.Mail, in contrast, is a fully managed implementation of an SMTP client.

包含。邮件不是SMTP协议的。net本机实现。相反,它在CDONTS中使用已有的COM功能。System.Net。相反,Mail是一个SMTP客户端的完全管理实现。

I've had far fewer problems with System.Net.Mail as it avoids COM hell.

我在System.Net上遇到的问题要少得多。邮件,因为它避免COM地狱。

#2


7  

Biggest issue with System.Net.Mail is that it has no support for Implicit SSL. Use System.Web.Mail until you don't have a need for Implicit SSL support.

最大的问题与System.Net。Mail是它不支持隐式SSL。使用包含。邮件,直到您不需要隐式SSL支持。

#3


5  

here are 2 sites that provide documentation and samples for both

这里有两个提供文档和示例的站点

http://www.systemwebmail.com/

http://www.systemwebmail.com/

http://www.systemnetmail.com/

http://www.systemnetmail.com/

#4


4  

The few times I ran into this, I found that that the methods and properties were all almost identical- changing the object type was just about all I had to do. There were one or two other little things, but they showed up with the lines and it was obvious what to do with Intellisense. I'd vote for going with the fully managed solution, get away from cdonts as soon as possible. It's not even installed on 03 server and newer.

有几次我遇到这种情况,我发现方法和属性几乎都是一样的——更改对象类型几乎就是我要做的所有事情。还有一两件小事情,但是它们出现了,而且很明显,如何使用智能感知。我会投票支持完全管理的解决方案,尽快离开cdonts。它甚至没有安装在03服务器上。

#5


4  

System.Web.Mail is deprecated, but should still work. You'll be annoyed with warnings about it being obsolete, but the functionality still carries on... for the time being.

包含。邮件已弃用,但仍应工作。您可能会对有关它已经过时的警告感到恼火,但是这个功能仍然在继续……目前。

I would agree with others that the conversion to System.Net.Mail was very trivial. I doubt you'd have to re-write more than a line or two.

我同意其他人对System.Net的转换。邮件很琐碎。我想你不需要再写一两行了。

#6


0  

Yes, we had the same issue, and we decided not to upgrade either. We haven't seen any problems, so you're OK ignoring the warnings.

是的,我们也有同样的问题,我们也决定不升级。我们没有看到任何问题,所以你可以无视警告。

#7


0  

We had implemented .netmail it was working at the beginning now is requiring username and password. So we went back to webmail as is working OK.

我们已经实现了。netmail,它在开始工作时需要用户名和密码。所以我们回到了webmail。