Store Functions — This section describes functions which are performed on MAPI Store objects.
mapifolder mapi_msgstore_getreceivefolder(mapimsgstore $store);
resource mapi_msgstore_openentry(mapimsgstore $messagestore,
string $entryID,
long $flags);
string mapi_msgstore_createentryid(resource $store,
string $username);
mapitable mapi_msgstore_openmultistoretable(mapimsgstore $store,
array $entryids,
long $flags);
mapifolder mapi_msgstore_getreceivefolder(mapimsgstore $store)
Open the inbox for the specified store.
This function requests the EntryID for the inbox of the given store and opens the folder. Returns a mapifolder object on success, FALSE on failure.
Example 3.24. Opening the inbox of a store
// Open the inbox for a user $store = mapi_logon_zarafa($username, $password, $serverlocation); $stores = mapi_getmsgstorestable($session); $storeslist = mapi_table_queryallrows($stores); $userstore = mapi_openmsgstore($session, $storeslist[0][PR_ENTRYID]); $inbox = mapi_msgstore_getreceivefolder($userstore);
resource mapi_msgstore_openentry(mapimsgstore $messagestore, string $entryID, long $flags
Opens an entry from the messagestore.
This function opens an entry from the messagestore. The function will return a mapifolder or a mapimessage, depending on the entryID. Returns a mapimessage or mapifolder object on success, FALSE on failure.
Bitmask of flags that controls how information is returned in the table. The following flags can be set:
Requests that the object be opened with the maximum network permissions allowed for the user and the maximum client application access. For example, if the client has read/write access, the object should be opened with read/write access; if the client has read-only access, the object should be opened with read-only access.
Requests read/write access. By default, objects are opened with read-only access, and clients should not work on the assumption that read/write access has been granted.
Open a Soft Deleted Message or Folder.
string mapi_msgstore_createentryid(resource $store, string $username)
Returns an entryid string to an arbitrary user store which exists on the Zarafa server.
Creates an EntryID to use with mapi_openmsgstore() function. Result is false if the store was not found, otherwise it will return a valid entryid.
mapitable mapi_msgstore_openmultistoretable(mapimsgstore $store, array $entryids, long $flags
Open a special table that may contain items from different stores. The items you wish the table to contain is passed to this function.
This function opens a special table which contains items the user sets. The return value can be treated a normal table, using the mapi_table_* functions to handle it.. Returns a mapitable object on success, FALSE on failure.
Example 3.27. Opening the special multistore table
// Open the inbox for a user $store = mapi_logon_zarafa($username, $password, $serverlocation); $stores = mapi_getmsgstorestable($session); $storeslist = mapi_table_queryallrows($stores); $userstore = mapi_openmsgstore($session, $storeslist[0][PR_ENTRYID]); // array() should be replaced with an array of entry id's of messages $mst = mapi_msgstore_openmultistoretable($userstore, array());