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

.net-2.0net

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.

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?

Best Answer

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.