Product SiteDocumentation Site

4.11. Default folders

Several folders like inbox, outbox, calendar, etc have a special status - they are default folders. MAPI clients will assign special behaviour to these folders. For example, the default folders cannot be renamed, deleted or moved. This limitation is completely client-enforced - MAPI itself doesn’t really care if you delete your inbox.
The default folders can be identified by several properties that contain the unique ID for those folders:
props = store.GetProps([PR_IPM_OUTBOX_ENTRYID, PR_IPM_TRASH_ENTRYID], 0)
result = store.GetReceiveFolder('IPM', 0)
inboxid = result[0]
inbox = store.OpenEntry(inboxid, None, 0)
props = inbox.GetProps([PR_IPM_APPOINTMENT_ENTRYID, PR_IPM_TASKS_ENTRYID, PR_IPM_CONTACTS_ENTRYID,
                                                PR_IPM_JOURNAL_ENTRYID, PR_IPM_NOTE_ENTRYID], 0)
As you can see, some properties for the default folders are set on the store, while others are set on the inbox object. The inbox object itself cannot be found by using a PR_IPM_\* property, but only by using the GetReceiveFolder() function.

Warning

Removing, moving or even renaming default folders can cause your MAPI applications to malfunction. It can also cause your MAPI client to generate a new set of folders, effectively hiding your old folders from the user.