D
dbguru316
I have the following script to send e-mail through exchange 2007 but I get
the error message "Fields update failed..."
Const cdoSendUsingPort = 2, cdoSendUsingExchange = 3, cdoBasic = 1
Dim objCDOConfig As Object, objCDOMessage As Object, strSch As String
.....
Dim varmailboxurl, varsendusername, varsendpassword As String
strSch = "http://schemas.microsoft.com/cdo/configuration/"
varsendusername = DLookup("[sendusername]", "tblEMailSetup")
varsendpassword = DLookup("[sendpassword]", "tblEMailSetup")
varmailboxurl = DLookup("[mailboxurl]", "tblEMailSetup")
Set objCDOConfig = CreateObject("CDO.Configuration")
With objCDOConfig.Fields
.Item(strSch & "sendusing") = cdoSendUsingExchange
.Item(strSch & "mailboxurl") = varmailboxurl
.Item(strSch & "sendusername") = varsendusername
.Item(strSch & "sendpassword") = varsendpassword
.Update
End With
.....
Any ideas? Does this approach even work with exchange 2007?
the error message "Fields update failed..."
Const cdoSendUsingPort = 2, cdoSendUsingExchange = 3, cdoBasic = 1
Dim objCDOConfig As Object, objCDOMessage As Object, strSch As String
.....
Dim varmailboxurl, varsendusername, varsendpassword As String
strSch = "http://schemas.microsoft.com/cdo/configuration/"
varsendusername = DLookup("[sendusername]", "tblEMailSetup")
varsendpassword = DLookup("[sendpassword]", "tblEMailSetup")
varmailboxurl = DLookup("[mailboxurl]", "tblEMailSetup")
Set objCDOConfig = CreateObject("CDO.Configuration")
With objCDOConfig.Fields
.Item(strSch & "sendusing") = cdoSendUsingExchange
.Item(strSch & "mailboxurl") = varmailboxurl
.Item(strSch & "sendusername") = varsendusername
.Item(strSch & "sendpassword") = varsendpassword
.Update
End With
.....
Any ideas? Does this approach even work with exchange 2007?