System.Web.Mail FAQ

Complete FAQ Listing


1.5 Is System.Web.Mail really a wrapper around the COM CDONTS and CDOSYS? Printer Friendly   Email This FAQ   Discuss

Yes. System.Web.Mail is not a full .NET native implementation of the SMTP protocol. Instead, it uses the existing CDONTS and CDOSSYS dlls already written by Microsoft some years ago. This can best be demonstrated by using Anakrino and reflecting into the SWM namespace and SmtpMail class. Inside of the SmtpMail class are two private classes called CdoNtsHelper and CdoSysHelper. Under the covers, CdoNtsHelper creates the CDONTS.Newmail object, while the CdoSysHelper creates the CDO.Message class. This can best be seen in the two screen shots CdoNtsHelper.gif and CdoSysHelper.gif.

Another interesting fact, is how SWM decides to use either the CDONTS.Newmail or the CDO.Message object. When the SmtpMail class sends the MailMesage, the SmtMail class checks the OS version. If the version is <= 4, the CDONTS.Newmail object is used. For all OS’s greater than 4, the CDO.Message object is used. Again, using Anakrino, the SmtpMailSend.gif screen shot verifies this behavior. Because of this condition, troubleshooting SWM can become interesting, when moving the code to different OS’s.
 

Discuss This FAQ Item
Got a question? Another Suggestion? Want to post your solution? Discuss it below.
New Post
  • CDONTS vs CDO/CDOSYS    [ Reply ]
  • How to distribute CDOSys.dll with VB.NET application on Windows98/Me/NT Server and Workstation4.0?    [ Reply ]
  • Outlook not installed    [ Reply ]
  • Question    [ Reply ]
  • Reg Fields.Add    [ Reply ]
    • RE: Reg Fields.Add    [ Reply ]
  • SMTP Mail response    [ Reply ]