Platform SDK: MAPI |
A receive folder is where incoming messages of a particular class are placed. For IPM and related report messages, MAPI assigns the Inbox as the default receive folder. For IPC and related report messages, MAPI assigns the root folder of the message store as the default receive folder. You can change these assignments or make additional assignments for other message classes. Making explicit receive folder assignments for your client's supported message classes is optional.
When an incoming message class does not have an assigned receive folder, the message store provider automatically uses the receive folder for the class that matches the longest possible prefix of the incoming class. For example, if your client receives a message of class IPM.Note.MyDocument and the only receive folder that has been established is the Inbox for IPM messages, this message will be placed in the Inbox because IPM.Note.MyDocument derives from the base class IPM.
When you are assigning a receive folder for IPC messages, never use a folder from the IPM subtree. These folders should be reserved for IPM messages only. Use instead a folder that is contained within the message store's root folder.
To create a receive folder for an IPM message class
To create a receive folder for an IPC message class
Assign the receive folder that you use for messages for related report messages. For example, if your client receives IPM.Note messages, set up one receive folder for future IPM.Note messages and the same receive folder for future Report.IPM.Note messages.
Note Use the IMsgStore::SetReceiveFolder method for more than establishing a receive folder association with messages of a particular class. The character string passed to SetReceiveFolder does not necessarily need to represent a message class. For example, you can map a folder to a character string, making it easier to find the folder when necessary. The most obvious alternative for associating folders to strings is to use message store named properties, an approach that is not recommended because MAPI does not define a range of message store properties for use by clients, and message store providers do not always support named properties.