Platform SDK: Exchange 2000 Server

Setting Network Proxy Information

[This is preliminary documentation and subject to change.]

When using methods such as IMessage.AddAttachment and IMessage.CreateMHTMLBody, you may need to access network resources through a proxy server. You set up the proxy configuration for a Message object as follows:

  1. Set the http://schemas.microsoft.com/cdo/configuration/urlproxyserver field in the Configuration object's IConfiguration.Fields collection.
  2. Optionally set the http://schemas.microsoft.com/cdo/configuration/urlproxybypass field to the value "<local>". With this setting, the proxy service will be bypassed for local addresses.
  3. Optionally set the http://schemas.microsoft.com/cdo/configuration/urngetlatestversion field to force retrieval of resources directly and bypass the cache.
' Reference to Microsoft ActiveX Data Objects 2.5 Library
' Reference to Microsoft CDO for Exchange 2000 Server Library
' ..
Dim iConf As New CDO.Configuration
Dim Flds  As ADODB.Fields
Set Flds  = iConf.Fields

' Set the configuration
Flds(cdoSendUsingMethod)           = cdoSendUsingPort
Flds(cdoSMTPServer)                = "mail.microsoft.com"
Flds(cdoSMTPServerPort)            = 26
Flds(cdoSMTPConnectionTimeout)     = 30
Flds(cdoSMTPAccountName)           = "My Name"
Flds(cdoSendUserReplyEmailAddress) = """User"" <user@microsoft.com>"
Flds(cdoSendEmailAddress)          = """User"" <user@microsoft.com>"
Flds(cdoURLProxyServer)            = "proxyserver:80"
Flds(cdoURLProxyBypass)            = "<local>"
Flds(cdoURLGetLatestVersion)       = True
Flds(cdoHTTPCookies)               = "cookies here"
' ... other settings
Flds.Update

Dim iMsg As New CDO.Message
Set iMsg.Configuration = iConf

' go on to use Message instance

See Also

http://schemas.microsoft.com/cdo/configuration/urlproxyserver

http://schemas.microsoft.com/cdo/configuration/urlproxybypass

http://schemas.microsoft.com/cdo/configuration/urngetlatestversion