Platform SDK: Exchange 2000 Server

IDropDirectory Interface

[This is preliminary documentation and subject to change.]

Defines an abstract method used to access a collection of messages that reside either in the SMTP default drop directory or in some other specified file system directory.

Note:

Because DropDirectory is only used for accessing messages on a file system, it is not useful in CDO for Exchange where messages are saved in the Web Store.

IID
CD000024-8B95-11D1-82DB-00C04FB1625D
Extends
IDispatch

Member Summary

Method

Name Description
GetMessages Returns a collection containing the messages in the specified directory.

Remarks

COM objects expose the IDropDirectory interface to provide access to a collection of messages stored on the file system. The GetMessages method returns a collection object exposing the IMessages interface. Each object in the collection is an instance of the Message COM class and contains the complete message stored in the file. If no file system path is specified, the SMTP service default drop directory is used. The default drop directory is where newly arrived messages are stored for local users.

Microsoft® Windows® 2000 does not provide direct mailbox support. Instead, incoming mail messages are delivered to a physical disk directory called a drop directory and placed in files with the .eml extension. Outgoing messages that you send are placed in another disk directory called a pickup directory. When you install and configure Windows 2000 server, the SMTP service determines path and file names for the drop and pickup directories. These directories are initialized and maintained by the service, and are the default locations for outgoing and inbound messages.

Example

[Visual Basic]
Dim iDropDir as New CDO.DropDirectory
Dim iMsgs as CDO.IMessages
Set iMsgs = iDropDir.GetMessages("c:\Inetput\mailroot\Drop")
' you now have the collection of messages
' in the SMTP drop directory
...
Set iMsgs = iDropDir.GetMessages("c:\mymessages")
' you now have the collection of messages
' located in the directory c:\mymessages
[C++,IDL]
#import "c:\program files\common files\system\ado\msado15.dll" no_namespace raw_interfaces_only
#import "c:\winnt\system32\cdosys.dll" no_namespace raw_interfaces_only
main() {
   CoInitialize(NULL);
  
   IDropDirectory* pDropDir = NULL;
   IMessages*      pMsgs    = NULL;
   CoCreateInstance(
      __uuidof(DropDirectory),
      NULL,
      CLSCTX_INPROC_SERVER,
      __uuidof(IDropDirectory),
      (void**)pDropDir
   );

    // get collection from SMTP drop directory
    pDropDir->GetMessages(L"c:\\Inetput\\mailroot\\Drop",&pMsgs); 
    pMsgs->Release();
    // get collection from specific directory
    pDropDir->GetMessages(L"c:\\mymessages",&pMsgs);
    pMsgs->Release();
    pDropDir->Release();
    CoUninitialize();
}
[VBScript]
Dim iDropDir
Set iDropDir = CreateObject("CDO.Configuration")
Dim iMsgs
Set iMsgs = iDropDir.GetMessages("c:\Inetpub\mailroot\Drop")
' you now have the collection of messages
' in the SMTP drop directory
...
Set iMsgs = iDropDir.GetMessages("c:\mymessages")
' you now have the collection of messages
' located in the directory c:\mymessages