What is the difference between System.Web.Mail
and System.Net.Mail
?
Asked
Active
Viewed 1.1k times
8

Martijn
- 11,964
- 12
- 50
- 96

Nithesh Narayanan
- 11,481
- 34
- 98
- 138
-
2Did you read the documentation? Seriously. if you ask waht is better etc- that is worthy an answer. Going through the classes item by item to find the difference is your homework with your copy of the documentation. – TomTom Apr 11 '11 at 07:31
-
system.net.mail came in with 2.0, so system.web.mail is the only option if you are using less than 2.0 – V4Vendetta Apr 11 '11 at 07:42
-
this stack-overflow thread may helps: http://stackoverflow.com/questions/64599/net-system-web-mail-vs-system-net-mail – Mandoleen Nov 02 '11 at 11:35
2 Answers
15
System.Web.Mail
was in .NET Framework v1.1System.Net.Mail
is 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.
-
Any idea if System.Net.Mail implementation is any faster than System.Web.Mail? Are there any other benefits? – Ciaran Gallagher Nov 07 '14 at 14:02
12
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

Josh Darnell
- 11,304
- 9
- 38
- 66

jgauffin
- 99,844
- 45
- 235
- 372