Platform SDK: Exchange 2000 Server

Setting the Send and Post Methods

[This is preliminary documentation and subject to change.]

With the Message object, you have the option of choosing how messages are sent or posted for delivery. These options depend upon the software installed on the machine running your CDO application. The following table lists these methods and describes when the method is available.

Method Description
Pickup Directory If the application is running on a machine that has installed SMTP and/or NNTP services, you can use that services pickup directory.
Network via SMTP or NNTP protocol You can connect directly to an SMTP or NNTP service and use the SMTP and/or NNTP protocol to send or post a message respectively.
Microsoft Exchange You can send and post messages using Microsoft® Exchange 2000 Server. In this case, the item is submitted using the Exchange OLE DB provider mail transmission URI when the sender's mailbox is on the local machine, or through the WebDAV mail transmission URI if the user's mailbox is on a remote Exchange service.

To set the send or post method for messaging objects, you perform the following tasks:

  1. Set the http://schemas.microsoft.com/cdo/configuration/sendusing and http://schemas.microsoft.com/cdo/configuration/postusing fields to the desired method in the associated Configuration object. The methods listed in the previous table are identified with enumerations CdoSendUsing and CdoPostUsing.
  2. Set any required or optional configuration fields that correspond to the send or post method.

The required and optional fields depend upon the send or post mechanism.

' 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)     = cdoSendUsingPort
' .. set additional fields
Flds.Update

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

See Also

Sending or Posting Using the Network

Sending or Posting Using the Pickup Directory