Well, at least so far, I haven't seen such a simple namespace that only includes three classes, and there is even a special website as a concluding summary:
System.Web.mail, Oh my!
Complete FAQ for the system.Web.mail Namespace
And the root cause is the method of sending mail in FCL or the bad CDO object of Windows 2000, and CDO is criticized before .NET, and its problem still exists, and does not say garbled, suddenly the problem Did not resolve. So ASP's programmers often stay in the world to find third-party controls, nor will Win2K has already built-in CDO.
More destined is that MSDN describes the MilMessage class, and its key Fields attribute is actually "[to be provided.]"
In fact, we need to send emails that need SMTP authentication through this property:
MailMessage EM = New MailMessage (); // Basic AuthenticationEM.fields.add ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate," 1 "); // set your username hereem.fields.add ("http://schemas.microsoft.com/cdpo/configuration/sendusername", username); // set your password hereem.fields.add ("http://schemas.microsoft.com/cdo/configuration/sendpassword" Password); // ...
This trick doesn't know where to come, anyway, SCOTT WATERMASYSK is in his work. The implementation in TEXT has become the example above.