6.5.1, BCA, VBA, CDONTS Mail Error Win 2003

We are migrating from BO 5.1.8 t o BO 6.5.1. We run all of our nightly production reports using VBA to supply dates, categories and a lot of information via Email confirmations. In VBA>>TOOLS>>References in 5.1.8 has
Visual Basic for Appliocations
Business Objects 5.1 Object Library
OLE Automation
Microsoft Forms 2.0 Objects Library
Microsoft ActiveX Data Objects 2.5 Library
Microsoft ActiveX Data Objects Recordset 2.7 Library

The VBA Code is

Set bomail = CreateObject("CDONTS.Newmail")
    bomail.from = "bomailbox@X.com"
    bomail.Value("Reply-to") = "paul@x.com"
    bomail.To = "paul@x.com;fred@x.com"
    
    msgheading = "Reports are now available  " + CStr(today)
    bomail.Subject = msgheading
    bomail.Body = msgString
    bomail.Send
    Set bomail = Nothing

All of this works.

In 6.5.1 the TOOL>>Reference is
Visual Basic for Appliocations
Business Objects 6.5 Object Library
OLE Automation
Microsoft Forms 2.0 Objects Library
Microsoft CDO for Windows 2000 Library
Microsoft ActiveX Data Objects 2.1 Library
Microsoft ActiveX Data Objects Recordset 2.8 Library

The VBA code is the same and the error I get is a 429 “AcitveX Component Can’t create object”

IIS is loaded and Smart host is configured. I can send and receive webmail on the server.

Any thoughts will be appreciated

Paul
Sitting on the Dock of the Bay (New York harbor really)

[Edited, when posting code samples please use the code option for formatting. It will preserve any indenting or formatting that you may have done.Thank you, Andreas.]


pcarbone :us: (BOB member since 2003-01-13)

Well, I figured it out. The ‘cdonts’ functionallity is not supported in the WIN2003 libraries. The object name is just ‘cdo’. The properties are a little different but analogous. The replacement code is

Dim bomail As CDO.Message
Dim msgheading As String
Set bomail = CreateObject("CDO.message")
bomail.from = "bomailbox@company.com"
bomail.ReplyTo = "pcarbone@company.com"
bomail.To = "pcarbone@company.com,fred@company.com"
msgheading = "Mail TEST "
bomail.Subject = msgheading
bomail.TextBody = ErrorString
bomail.Send
Set bomail = Nothing

This is working now.


pcarbone :us: (BOB member since 2003-01-13)

Very nice update, thank you :yesnod:


Andreas :de: (BOB member since 2002-06-20)

Well, I figured it out. The ‘cdonts’ functionallity is not supported in the WIN2003 libraries. The object name is just ‘cdo’. The properties are a little different but analogous. The replacement code is

Dim bomail As CDO.Message
Dim msgheading As String
Set bomail = CreateObject(“CDO.message”)
bomail.from = “bomailbox@company.com
bomail.ReplyTo = “pcarbone@company.com
bomail.To = “pcarbone@company.com,fred@company.com
msgheading = "Mail TEST "
bomail.Subject = msgheading
bomail.TextBody = ErrorString
bomail.Send
Set bomail = Nothing

This is working now.


pcarbone :us: (BOB member since 2003-01-13)