CDONTS was designed to be run as an in-process component using IIS 4.0 on Win NT 4.0. When you run an application out-of-process it runs in MTS.EXE (IIS 4.0) or DLLHOST.EXE (IIS5) process using the IWAM_<computername> account. When running applications out-of-process, the IWAM account may require access to files and system resources. In the case of the CDONTS object, the IWAM account requires access to the machine keys of the system and certain folders in the Inteinfo\Mailroot folder.
With this information in hand, there are a few possibilities. First, as a matter of policy, you should recode your applications to use the CDOSYS object. This will help to ensure future support as the CDOSYS object is not installed on Windows 2000 or Windows Server 2003. This may or may not be sufficient to solve your problem. Secondly, if the CDONTS application runs in process but not out-of-process, you are almost certainly looking at an issue related to the IWAM user account permissions. Running your CDONTS application in process may not be possible or desirable for security reasons, but will avoid permissions-related problems associated with the IWAM account. Verify the Mailroot and machine keys have the proper permissions. Thirdly, you also get the error you’re seeing if the user that launches the ASP script does not have proper permissions on the Mailroot\Pickup folder. By default the MailRoot folder is set to Everyone – Full Control, which is too permissive. I would suggest assigning Authenticated Users – Read/Write, in addition to System and Administrators Full Control. This will allow the IUSR and IWAM users as well as any other user accounts to write mail to the SMTP folders. You should also Deny Execute the IUSR_<computername> on these folders. If you have run the IIS Lockdown tool, you can use the Web Anonymous Users local group for this purpose. Do not deny the Web Applications group Write permissions.
Upon further review... In Windows 2000, it is recommended that you use CDOSYS instead of CDONTS. While CDONTS does work on Windows 2000, CDOSYS provides a greater feature set. See
http://msdn.microsoft.com/library/default....cdo_roadmap.asp for more information. Additionally, CDONTS is not supported in Windows Server 2003 or Windows XP. Therefore, you need to modify your code....