I have currently upgraded from SBS 4.5 to SBS 2000. I have exchange server colocated on the IIS server. I was using, but have now switched to CDOSYS. I am completely stuck. I have attached my code for review:
Dim iMsg
Dim iConf
Dim Flds
Dim HTML
Const cdoSendUsingPort = 2
set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject ("CDO.Configuration")
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "cdaasvr.cdaa.local"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With
HTML = "This is a test"
With iMsg
Set .Configuration = iConf
.To = "
[email protected]"
.From = "
[email protected]"
.Subject = "Testing"
.HTMLBody = HTML
.Send
End With
' Clean up variables.
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
When I execute this code the error reads:
Microsoft VBScript runtime (0x800A0411)
Name redefined: 'cdoSendUsingPort'
Any help would be appreciated. I have created a .VBS script that work fine, except for the Const cdoSendUsingPort = 1. I have tried that code also but receive the same error.
Thanks
Debbie