.net: System.Web.Mail vs System.Net.Mail

前端 未结 7 935
慢半拍i
慢半拍i 2020-12-01 02:31

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.

相关标签:
7条回答
  • 2020-12-01 02:56

    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.

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

    0 讨论(0)
  • 2020-12-01 02:57

    here are 2 sites that provide documentation and samples for both

    http://www.systemwebmail.com/

    http://www.systemnetmail.com/

    0 讨论(0)
  • 2020-12-01 03:10

    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.

    0 讨论(0)
  • 2020-12-01 03:12

    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.

    0 讨论(0)
  • 2020-12-01 03:15

    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.

    0 讨论(0)
  • 2020-12-01 03:20

    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.

    0 讨论(0)
提交回复
热议问题