Platform SDK: Exchange 2000 Server

Sending or Posting Using the Pickup Directory

[This is preliminary documentation and subject to change.]

Perform the following steps to send messages using a local SMTP pickup directory.

  1. Set the http://schemas.microsoft.com/cdo/configuration/sendusing or http://schemas.microsoft.com/cdo/configuration/postusing field to cdoSendUsingPickup and CdoPostUsingPickup in the Configuration object respectively.
  2. Set the following additional fields used with pickup directories:
    Name Description
    smtppickupdirectory

    nntppickupdirectory

    The full paths to the pickup directories for the SMTP and NNTP services. These values are normally automatically loaded when the Configuration object is created if the local services are installed.
    flushbuffersonwrite Indicates whether to override file system buffering when writing the messages to the pickup directory. If set to True, then the messages are committed directly to disk when written. Setting this field to True can cause performance degradation.

The following example demonstrates explicitly setting various fields used when sending messages using the SMTP pickup directory on the local machine.

' 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)          = cdoSendUsingPickup
Flds(cdoSendUserReplyEmailAddress)= """User"" <user@microsoft.com>"
Flds(cdoSendEmailAddress)         = """User"" <user@microsoft.com>"
' ... other settings
Flds.Update

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

' go on to use the Message object.

Many of these settings can be loaded if an SMTP service is installed on the local machine. See Using Default Configuration Settings for more information.

See Also

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

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

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