Why is CDONTS not configured on my dedicated server?

If you have a dedicated server running Windows Server 2003 operating system, then you may notice that CDONTS does not work. Windows Server 2003 does not install Collaboration Data Objects (CDO) for NTS (CDONTS). Instead, Microsoft has continued with support for CDO for Windows 2000 (CDOSYS), which has more functionality than CDONTS.

Microsoft Windows Server 2003 Does Not Install CDONTS

The above Microsoft article used to provide instructions for installing CDONTS, but for some reason Microsoft has chosen to remove these instructions. You may be able to copy
the DLL from a Windows 2000 installation, and register the DLL to "force it to work" on Windows Server 2003. There are some tutorials on the Internet that walk you through this. However, the recommended action is to migrate to CDOSYS.

A simple CDOSYS sample in ASP can be found here:

Send e-mail programmatically using CDO

Note that .NET's "System.Web.Mail" namespace provides a managed wrapper for CDOSYS. See the following for sample code:

<%@ Page Language="VB" %>
<script runat="server">
    Sub page_load(ByVal sender As Object, ByVal e As System.EventArgs)
        Dim msg As System.Net.Mail.MailMessage = New System.Net.Mail.MailMessage()
        Dim mailSvr As System.Net.Mail.SmtpClient = New System.Net.Mail.SmtpClient()
        msg.To.Add( )
        msg.Subject = "Test"
        msg.Body = "Test"
        msg.From = New System.Net.Mail.MailAddress(" ")
        mailSvr.Host = "<< your SMTP host>>"
    End Sub

Article ID: 352, Created On: 10/12/2004, Modified: 6/2/2009

Feedback (0)