Introduction

When working with classic ASP applications, you may occasionally encounter the following error:

ActiveX component can't create object: 'CDONTS.NewMail'

This issue typically occurs because CDONTS (Collaboration Data Objects for Windows NT Server) is either missing or not properly registered on the server.

CDONTS is a legacy component used to send emails from ASP applications. Although it is deprecated in modern environments, some older applications still rely on it. This guide walks you through resolving this issue step by step.

Root Cause

The error indicates one or more of the following:

  • CDONTS library is not installed
  • The DLL is not registered properly
  • SMTP service is not configured or running

Step-by-Step Solution

1. Download CDONTS

http://kb.parallels.com/Attachments/6336/Attachments/cdonts.zip

Download the required CDONTS package:

2. Extract the DLL

Unzip the downloaded file and locate:

cdonts.dll

Copy it to the appropriate system directory:

  • For 32-bit systems: C:\Windows\System32
  • For 64-bit systems: C:\Windows\SysWOW64

3. Register the DLL

Open Command Prompt as Administrator and run:

  • For 32-bit systems: regsvr32 "%systemroot%\system32\cdonts.dll"
  • For 64-bit systems: regsvr32 "%systemroot%\syswow64\cdonts.dll"

You should see a confirmation message indicating successful registration.

4. Verify SMTP Service

CDONTS depends on an SMTP service to send emails.

Check if SMTP is Installed:

  1. Open Administrative Tools
  2. Launch Internet Information Services (IIS) Manager
  3. Expand your local server

If SMTP Virtual Server is listed, it is already installed.

5. Install SMTP (if not present)

If SMTP is missing:

  1. Go to Control Panel
  2. Open Add/Remove Programs
  3. Click Add/Remove Windows Components
  4. Select: Application Server → IIS → SMTP Service
  5. Click OK and complete installation

6. Configure SMTP Port

By default, SMTP uses port 25.

  • If another mail service is already using port 25, change the port (e.g., 8025)

Steps:

  1. Open IIS Manager
  2. Expand: Local Computer → SMTP Virtual Server
  3. Right-click → Properties
  4. Go to General → Advanced
  5. Edit the port number

7. Configure SMTP Settings

Set up a Fully Qualified Domain Name (FQDN):

  1. Open: SMTP Virtual Server → Properties
  2. Go to: Delivery → Advanced
  3. Enter a valid domain name (e.g., mail.yourdomain.com)

8. Set Security Permissions

Grant required permissions to the IIS worker group:

  1. Go to: SMTP Virtual Server → Properties → Security
  2. Click Add
  3. Click Object Types
  4. Select Groups
  5. Enter: IIS_WPG
  6. Click OK

9. Assign Folder Permissions

Ensure proper write access to the SMTP pickup folder:

C:\Inetpub\mailroot\pickup

Grant Write permissions to:

psacln group

Important Notes

  • CDONTS is deprecated and not recommended for modern applications.
  • For new development, consider using:
    • CDO.Message
    • .NET SMTP libraries
    • External mail APIs

Conclusion

The “ActiveX component can’t create object: ‘CDONTS.NewMail’” error is typically caused by missing or improperly configured CDONTS components or SMTP services.

By following the steps above—installing the DLL, registering it, and properly configuring SMTP—you can quickly restore email functionality in legacy ASP applications.

However, since CDONTS is outdated, it is strongly recommended to plan a migration to more modern and secure email-sending methods to ensure long-term stability and compatibility.

Leave a Reply