ActiveX component can’t create object: ‘CDONTS.NewMail’
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:
- Open Administrative Tools
- Launch Internet Information Services (IIS) Manager
- Expand your local server
If SMTP Virtual Server is listed, it is already installed.
5. Install SMTP (if not present)
If SMTP is missing:
- Go to Control Panel
- Open Add/Remove Programs
- Click Add/Remove Windows Components
- Select:
Application Server → IIS → SMTP Service - 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:
- Open IIS Manager
- Expand:
Local Computer → SMTP Virtual Server - Right-click → Properties
- Go to General → Advanced
- Edit the port number
7. Configure SMTP Settings
Set up a Fully Qualified Domain Name (FQDN):
- Open:
SMTP Virtual Server → Properties - Go to:
Delivery → Advanced - Enter a valid domain name (e.g.,
mail.yourdomain.com)
8. Set Security Permissions
Grant required permissions to the IIS worker group:
- Go to:
SMTP Virtual Server → Properties → Security - Click Add
- Click Object Types
- Select Groups
- Enter:
IIS_WPG - 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.
