Discussion:
Unable to create CDO.Message object
(too old to reply)
talk_positive
2005-08-25 07:42:01 UTC
Permalink
Hi....

I have been trying desperately to send mail using CDO objects. My platform
is Windows 2000 Server and am having Exchange server 2003 installed. I

am actully desigining workflow using workflow designer...

The code is as follows..........

***************************************************
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
cdoConfig.Fields.Item(sch & "sendusing") = 2
cdoConfig.Fields.Item(sch & "smtpserver") = "msexchange.com"
cdoConfig.fields.update

Set cdoMessage = CreateObject("CDO.Message")
Set cdoMessage.Configuration = cdoConfig
cdoMessage.From = "***@me.com"
cdoMessage.To = "***@me.com"
cdoMessage.Subject = "Sample CDONTS NewMail"
cdoMessage.TextBody = "This is a test for CDONTS message"
cdoMessage.Send
Set cdoMessage = Nothing
Set cdoConfig = Nothing
***************************************************

Now...if i run this code i get error message...." ActiveX component can't
create object 'CDO.Configuration' "
If i modify the 2nd line to " Set cdoConfig =
Server.CreateObject("CDO.Configuration") ", as someone suggested...then i
get the error..." Server

object expected ".

I searched my machine for " *CDO*.dll " files and found CDOSYS.dll, CDO.dll
& CDOEX.dll.
I also registered them using the "regsrv32" command as was mentioned in one
MSDN article.
Could this be a problem because of the multiple CDO files?

I have made sure that Everone has atleast Read permission for CDO files.

If i remove the Configuration part of the code then i get the error "
ActiveX component can't create object 'CDO.Message' ".


I have made sure that the IIS service is running....( if it happens to have
any relation with CDO )

Can u help me locate and correct the problem? Also, can u suggest another
way to send mail if CDO does not work. Plz exclude Jmail.

If u need any clearifications u can either post a message or mail me at
***@gmail.com.

Thanks in advance....

- Anoop
URU_NOMAD
2005-08-31 14:01:03 UTC
Permalink
I have the exact same problem. Can anyone help to resolve this. I am on
an NT box.
Post by talk_positive
Hi....
I have been trying desperately to send mail using CDO objects. My platform
is Windows 2000 Server and am having Exchange server 2003 installed. I
am actully desigining workflow using workflow designer...
The code is as follows..........
***************************************************
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
cdoConfig.Fields.Item(sch & "sendusing") = 2
cdoConfig.Fields.Item(sch & "smtpserver") = "msexchange.com"
cdoConfig.fields.update
Set cdoMessage = CreateObject("CDO.Message")
Set cdoMessage.Configuration = cdoConfig
cdoMessage.Subject = "Sample CDONTS NewMail"
cdoMessage.TextBody = "This is a test for CDONTS message"
cdoMessage.Send
Set cdoMessage = Nothing
Set cdoConfig = Nothing
***************************************************
Now...if i run this code i get error message...." ActiveX component can't
create object 'CDO.Configuration' "
If i modify the 2nd line to " Set cdoConfig =
Server.CreateObject("CDO.Configuration") ", as someone suggested...then i
get the error..." Server
object expected ".
I searched my machine for " *CDO*.dll " files and found CDOSYS.dll, CDO.dll
& CDOEX.dll.
I also registered them using the "regsrv32" command as was mentioned in one
MSDN article.
Could this be a problem because of the multiple CDO files?
I have made sure that Everone has atleast Read permission for CDO files.
If i remove the Configuration part of the code then i get the error "
ActiveX component can't create object 'CDO.Message' ".
I have made sure that the IIS service is running....( if it happens to have
any relation with CDO )
Can u help me locate and correct the problem? Also, can u suggest another
way to send mail if CDO does not work. Plz exclude Jmail.
If u need any clearifications u can either post a message or mail me at
Thanks in advance....
- Anoop
Jason Johnston [MSFT]
2005-08-31 14:37:15 UTC
Permalink
Ok...if you regsvr'ed those DLL's without realizing what they are, you may
have caused problems.

- CDO.DLL: has nothing to do with this. This is CDO 1.21, the MAPI-based
API (MAPI.Session, etc). Leave it alone.
- CDOSYS.DLL: This is the Windows version of the CDO you are trying to use
(CDO.Configuration, etc).
- CDOEX.DLL: This is Exchange's version of the CDO you are trying to use

Since you are on Exchange, CDOEX.DLL is the one that should be registered
and used. When CDOEX is registered, it replaces CDOSYS.

I would unregister both CDOEX and CDOSYS (to get back to a "blank slate").
Once that's done, search the registry and make sure that "CDO.Message" isn't
there anymore under HKEY_CLASSES_ROOT.

Then register CDOEX. You should now find entries for CDO.Message,
CDO.Configuration, etc in the registry.

Hopefully that should fix you up. If not, then I'd use RegMon and FileMon
to capture registry and file system access while you run your repro script.
Then check the logs for errors.

Good luck!
Post by URU_NOMAD
I have the exact same problem. Can anyone help to resolve this. I am on
an NT box.
Post by talk_positive
Hi....
I have been trying desperately to send mail using CDO objects. My platform
is Windows 2000 Server and am having Exchange server 2003 installed. I
am actully desigining workflow using workflow designer...
The code is as follows..........
***************************************************
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
cdoConfig.Fields.Item(sch & "sendusing") = 2
cdoConfig.Fields.Item(sch & "smtpserver") = "msexchange.com"
cdoConfig.fields.update
Set cdoMessage = CreateObject("CDO.Message")
Set cdoMessage.Configuration = cdoConfig
cdoMessage.Subject = "Sample CDONTS NewMail"
cdoMessage.TextBody = "This is a test for CDONTS message"
cdoMessage.Send
Set cdoMessage = Nothing
Set cdoConfig = Nothing
***************************************************
Now...if i run this code i get error message...." ActiveX component can't
create object 'CDO.Configuration' "
If i modify the 2nd line to " Set cdoConfig =
Server.CreateObject("CDO.Configuration") ", as someone suggested...then i
get the error..." Server
object expected ".
I searched my machine for " *CDO*.dll " files and found CDOSYS.dll, CDO.dll
& CDOEX.dll.
I also registered them using the "regsrv32" command as was mentioned in one
MSDN article.
Could this be a problem because of the multiple CDO files?
I have made sure that Everone has atleast Read permission for CDO files.
If i remove the Configuration part of the code then i get the error "
ActiveX component can't create object 'CDO.Message' ".
I have made sure that the IIS service is running....( if it happens to have
any relation with CDO )
Can u help me locate and correct the problem? Also, can u suggest another
way to send mail if CDO does not work. Plz exclude Jmail.
If u need any clearifications u can either post a message or mail me at
Thanks in advance....
- Anoop
Loading...