Outlook附加Exchange账户已发送文件夹EntryId运行时变更求助
Outlook附加Exchange账户已发送文件夹EntryID变更问题
问题背景
我使用Outlook时遇到已发送文件夹(Sent Folder)异常问题:名下有两个Exchange账户,默认账户运行一切正常,但附加账户出现EntryID变更的异常情况。
附加账户初始EntryID信息
outboxMailEntryID = 00000000A24FEAFFFFB93C47A13126365D132558010010E2685A8E0AC440B14F77F5EE5275A5000000BBA**800000**0 sentMailEntryID = 00000000A24FEAFFFFB93C47A13126365D132558010010E2685A8E0AC440B14F77F5EE5275A5000000BBA7FF0000
EntryID变更详情
附加账户下名称为Gesendete Elemente的已发送文件夹EntryID在运行过程中发生变更:
- 变更前:
IsOutputExtended check folder.Name = **Gesendete Elemente** folder.EntryID = 00000000A24FEAFFFFB93C47A13126365D132558018010E2685A8E0AC440B14F77F5EE5275A5000000BBA**8000000**
- 变更后:
IsOutputExtended check folder.Name = **Gesendete Elemente** folder.EntryID = 00000000A24FEAFFFFB93C47A13126365D132558018010E2685A8E0AC440B14F77F5EE5275A5000000BBA**8000100**
用于判断文件夹类型的代码
以下是我编写的判断文件夹类型的C#代码片段:
private static bool IsOutputExtended(MAPIFolder currentFolder) { PropertyAccessor propAcc = null; Microsoft.Office.Interop.Outlook.Folders folders = null; MAPIFolder rootFlder = null; Store store = null; if(currentFolder == null) return false; try { store = currentFolder.Store; const string PR_IPM_OUTBOX_ENTRYID = "http://schemas.microsoft.com/mapi/proptag/0x35E40102"; const string PR_IPM_SENTMAIL_ENTRYID = "http://schemas.microsoft.com/mapi/proptag/0x35E20102"; rootFlder = store?.GetRootFolder(); folders = rootFlder?.Folders; string sentMailEntryID = ""; string outboxMailEntryID = ""; propAcc = store?.PropertyAccessor; try { if (propAcc != null) { object entryOutbox = propAcc.GetProperty(PR_IPM_OUTBOX_ENTRYID); outboxMailEntryID = propAcc.BinaryToString(entryOutbox); object entrySend = propAcc.GetProperty(PR_IPM_SENTMAIL_ENTRYID); sentMailEntryID = propAcc.BinaryToString(entrySend); } } catch(Exception ex) { CobraMain.Logger.Warn("Error in IsOutputExtended by Check PR_IPM_OUTBOX_ENTRYID and PR_IPM_SENTMAIL_ENTRYID for " + currentFolder.Name, ex); } if(currentFolder.EntryID == sentMailEntryID || currentFolder.EntryID == outboxMailEntryID) return true; ....
请问该问题的原因是什么?感谢解答。
内容的提问来源于stack exchange,提问作者Viktoriusrex
相关产品推荐
相关产品推荐

