Platform SDK: Exchange 2000 Server

Sending or Posting Using Exchange

[This is preliminary documentation and subject to change.]

Perform the following steps to send messages using Microsoft Exchange 2000 Server.

  1. Set the http://schemas.microsoft.com/cdo/configuration/sendusing or http://schemas.microsoft.com/cdo/configuration/postusing field to cdoSendUsingExchange and CdoPostUsingExchange in the Configuration object.
  2. Set the http://schemas.microsoft.com/cdo/configuration/sendusername and http://schemas.microsoft.com/cdo/configuration/postusername fields to the email address of the sender. These values are used to look up the Exchange service on which the sender's mailbox resides. Mail can only be submitted to the Exchange service containing the sender's mailbox.
  3. Set the following additional fields used when sending or posting with Exchange:
    Name Description
    hardlinklist A multi-valued string property. Each string is the URL to a public folder in the Web Store to which you want the message to be posted.

The following example demonstrates explicitly setting various fields used when sending messages using Microsoft Exchange 2000 Server.

' 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 for Network Send
Flds(cdoSendUsingMethod)          = cdoSendUsingExchange
Flds(cdoSendUserReplyEmailAddress)= """User"" <user1@microsoft.com>"
Flds(cdoSendEmailAddress)         = """User"" <user1@microsoft.com>"
Flds(cdoSendUserName)             = """User"" <user1@microsoft.com>"
' ... other settings
Flds.Update

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

' go on to use the Message object

iMsg.Send ' Message is sent using the sender's Exchange service