Platform SDK: Exchange Server

Creating a Mailbox

To create a mailbox for a recipient, create the object for that recipient in the directory. Later, the information store automatically creates a mailbox the first time a person or an application logs on as this recipient (after a MAPI profile has been created) or when someone tries to send mail to the recipient. No separate action is needed to create the object in the information store.

To create a mailbox for a recipient

Create a mailbox object in the directory by calling the DAPIWrite function. You can also use this call to DAPIWrite to create a Windows NT user account. In this function call, pass the pAttributes parameter, which points to a DAPI_ENTRY structure containing names of attributes to write. In this DAPI_ENTRY structure, you need to specify, at minimum, the following attributes: