Discussion:
Microsoft cdo for nts 1.2 library
(too old to reply)
ValK
2004-11-09 20:25:04 UTC
Permalink
Hello.
I'm not sure if i use the right discussion group, but here is my problem:

I'm using Microsoft cdo for nts 1.2 library in my vb6 project.
Simple code that sent out email to the user.

Dim oMsg As New CDONTS.NewMail

Set oMsg = CreateObject("CDONTS.NewMail")
oMsg.Subject = "test"
oMsg.From = "***@comcast.net"
oMsg.To = "***@yahoo.com"
oMsg.MailFormat = CdoMailFormatMime
oMsg.BodyFormat = CdoBodyFormatText 'CdoBodyFormatHTML
oMsg.Body = "Hello this is a test"
oMsg.Send

It works fine on local pc(windows xp pro.) and test server(windows 2000
server)
But it will not work on the production server(windows 2000 server)

following error occurs:

Error code: Error #: 429
Description: Error Description: ActiveX component can't create object
Source: basMain.SendEMail()

Any ideas?????????

Thanks for help

Val
Michael D. Ober
2004-12-07 19:28:30 UTC
Permalink
CDONTS has been discontinued. Here's the replacement code for Windows 2000
Server, XP, and 2003. Note that Exhange 5.5 will install CDONTS.

dim CDO ' as CDO.Message
dim CDOConfig ' as CDO.Configuration

' Send file using CDO
set cdoConfig = CreateObject("CDO.Configuration")
with cdoConfig.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"yoursmtpserver.domain"
.Update
end with

set cdoMsg = CreateObject("CDO.Message")
with cdoMsg
set .Configuration = cdoConfig
.To = "***@yahoo.com"
.From = "***@comcast.net"
.Subject = fso.GetFile(oldfile).Name
.AddAttachment oldfile
.Body = "Hello this is a test"
.Send
end with

As for the mail format, I haven't tried to change if from Plain text, but
CDO can do this.

Mike.
Post by ValK
Hello.
I'm using Microsoft cdo for nts 1.2 library in my vb6 project.
Simple code that sent out email to the user.
Dim oMsg As New CDONTS.NewMail
Set oMsg = CreateObject("CDONTS.NewMail")
oMsg.Subject = "test"
oMsg.MailFormat = CdoMailFormatMime
oMsg.BodyFormat = CdoBodyFormatText 'CdoBodyFormatHTML
oMsg.Body = "Hello this is a test"
oMsg.Send
It works fine on local pc(windows xp pro.) and test server(windows 2000
server)
But it will not work on the production server(windows 2000 server)
Error code: Error #: 429
Description: Error Description: ActiveX component can't create object
Source: basMain.SendEMail()
Any ideas?????????
Thanks for help
Val
ValK
2004-12-08 14:09:01 UTC
Permalink
Thank you Mike.
I will try this on production server.

Val
Post by Michael D. Ober
CDONTS has been discontinued. Here's the replacement code for Windows 2000
Server, XP, and 2003. Note that Exhange 5.5 will install CDONTS.
dim CDO ' as CDO.Message
dim CDOConfig ' as CDO.Configuration
' Send file using CDO
set cdoConfig = CreateObject("CDO.Configuration")
with cdoConfig.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"yoursmtpserver.domain"
.Update
end with
set cdoMsg = CreateObject("CDO.Message")
with cdoMsg
set .Configuration = cdoConfig
.Subject = fso.GetFile(oldfile).Name
.AddAttachment oldfile
.Body = "Hello this is a test"
.Send
end with
As for the mail format, I haven't tried to change if from Plain text, but
CDO can do this.
Mike.
Post by ValK
Hello.
I'm using Microsoft cdo for nts 1.2 library in my vb6 project.
Simple code that sent out email to the user.
Dim oMsg As New CDONTS.NewMail
Set oMsg = CreateObject("CDONTS.NewMail")
oMsg.Subject = "test"
oMsg.MailFormat = CdoMailFormatMime
oMsg.BodyFormat = CdoBodyFormatText 'CdoBodyFormatHTML
oMsg.Body = "Hello this is a test"
oMsg.Send
It works fine on local pc(windows xp pro.) and test server(windows 2000
server)
But it will not work on the production server(windows 2000 server)
Error code: Error #: 429
Description: Error Description: ActiveX component can't create object
Source: basMain.SendEMail()
Any ideas?????????
Thanks for help
Val
Loading...