What is the difference between System.Web.Mail and System.Net.Mail?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
-
System.Web.Mailwas in .NET Framework v1.1 -
System.Net.Mailis in .NET Framework v2.0 onwards
They are both used for the same purpose. If you use System.Web.Mail it only shows a warning, saying this is deprecated. It still works as supposed to.
If you are really using higher version (2.0 or later) of .NET framework, then use System.Net.Mail.
Method 2
First line in MSDN for the System.Web.Mail namespace:
The classes in this namespace have been deprecated. Use the System.Net.Mail namespace instead
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0