Multiple choice technology web technology

Why would you not use System.Web.Mail instead of System.Net.Mail

  1. It does not cover all the functions as covered by System.Net.Mail

  2. It is obsolete as compared to System.Net.Mail

  3. It is not secure way of sending mails.

  4. None of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

System.Web.Mail is marked as obsolete and deprecated by Microsoft. It was replaced by System.Net.Mail which provides better functionality, security, and maintainability. Using obsolete classes is discouraged as they may be removed in future versions and often lack modern features. System.Net.Mail became the standard starting with .NET Framework 2.0.

AI explanation

System.Web.Mail was the original .NET email API but was marked obsolete starting with .NET Framework 2.0 in favor of System.Net.Mail, which offers a cleaner object model and better SMTP support. Since it's deprecated, Microsoft recommends against using it in new code even though it technically still works in older frameworks.