none
How to Delete Special Folders in Message Store? RRS feed

  • Question

  • Hi,

    I am using HrValidateIPMSubtree to create full IPM subtree folders. Then I try to delete the Outbox folder by invoke DeleteFolder function in https://docs.microsoft.com/en-us/office/client-developer/outlook/mapi/imapifolder-deletefolder . However, after I delete the folder, I find the property PR_IPM_OUTBOX_ENTRYID still exist in the message store. It is not deleted automatically. When I use lpMsgStore->OpenEntry to open the entry ID of the property, then I will get a NULL value for the folder, indicating the folder does not exist any more.

    Therefore, I just wonder if I need to delete a special folder in the message store, is there a function that can delete the folder and remove the corresponding property value in the message store automatically. Or do I need to remove the property value manually after deleting the folder?

    Thanks


    Wednesday, June 26, 2019 8:40 AM

All replies

  • Hello,

    Why do you need to delete the folder and property of the standard interpersonal message (IPM) Outbox folder?

    Outbound messages are usually created in the Outbox folder. Interpersonal messages should be placed in this folder for submission.

    There is no mechanisms for deleting the property value simultaneously. Folders and property values are different entities.


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Wednesday, June 26, 2019 9:47 AM
  • Hi, Eugene

    Sometimes I need to create a PST file without the Outbox for clients. Therefore, since the Outbox folder and the PR_IPM_OUTBOX_ENTRYID property are related to each other, I think there may be functions that will keep these two consistent with each other.

    For example, when using HrValidateIPMSubtree, both will be created and the bit mask in PR_VALID_FOLDER_MASK is set.

    So, may be there is a similar Hrxxx function that will do all the things, including removing the folder, the property and set the  PR_VALID_FOLDER_MASK altogether to make sure the data in the PST file are consistent.

    Wednesday, June 26, 2019 12:50 PM
  • Nope.

    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Wednesday, June 26, 2019 1:10 PM
  • It is your responsibility to delete / update the PR_IPM_OUTBOX_ENTRYID property.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Friday, June 28, 2019 7:38 PM