vbscript to send e-mail to exchange 2007

  • Follow


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?
0
Reply Utf 1/22/2010 7:37:02 PM


0 Replies
858 Views

(page loaded in 0.009 seconds)

Similiar Articles:
















7/21/2012 6:03:27 PM


Reply: