FOLDER_IPM_INBOX_VALID is for which receive folder?

Category: outlook for developers


tempc on Sun, 23 Jun 2019 10:04:59


For property PR_VALID_FOLDER_MASK, there is a flag FOLDER_IPM_INBOX_VALID indicate whether the IPM receive folder is valid or not.

However, based on GetReceiveFolder, there may be different receive folders for different message class. So FOLDER_IPM_INBOX_VALID is corresponding to which receive folder, the receive folder for message class IPM or IPM.Note?


Eugene Astafiev on Sun, 23 Jun 2019 14:32:54

You may find the following description in MSDN for the GetReceiveFolder method:

The GetReceiveFolder method obtains the entry identifier of a receive folder, a folder designated to receive incoming messages of a particular message class. Callers can specify a message class or NULL in the lpszMessageClass parameter. IflpszMessageClass is NULL, GetReceiveFolder returns the following values:

  • In lppszExplicitClass, the name of the first base class of the message class pointed to by lpszMessageClass that does explicitly set a receive folder.

  • In lppEntryID, the entry identifier of the receive folder for the base class pointed to by the lppszExplicitClass parameter.

For example, suppose the receive folder of the message class IPM.Note has been set to the entry identifier of the Inbox and GetReceiveFolder is called with the contents of lpszMessageClass set to IPM.Note.Phone. If IPM.Note.Phone does not have an explicit receive folder set, GetReceiveFolder returns the entry identifier of the Inbox in lppEntryID and IPM.Note in lppszExplicitClass.

If the client calls GetReceiveFolder for a message class and has not set a receive folder for that message class, lppszExplicitClass is either a zero-length string, a string in Unicode format, or a string in ANSI format depending on whether the client set the MAPI_UNICODE flag in the ulFlags parameter.

A default receive folder, obtained by passing NULL in the lpszMessageClass parameter, always exists for every message store.

Dmitry Streblechenko _MVP_ on Sun, 23 Jun 2019 18:28:14

It is my understanding that FOLDER_IPM_INBOX_VALID says "there is some inbox in the store if you don't care which kind". If you need the actual message class specific inbox, you need to call  GetReceiveFolder and/or GetReceiveFolderTable.