FindFolders找不到用户创建的文件夹

FindFolders找不到用户创建的文件夹

本文介绍了EWS托管API:FindFolders找不到用户创建的文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我希望这很简单......我需要在每个用户的邮箱中找到最早的电子邮件。 更具体地说,在每个用户的邮箱中的ARCHIVE文件夹下的任何位置(包括该文件夹的子文件夹中的电子邮件)。 这不是托管文件夹 - 我们是为每个用户创建的。 它不在收件箱下,而是与Outlook中的收件箱显示在同一级别。

我不是Exchange管理员,所以我不确定我哪里出错,但是当我使用深度遍历为所有文件夹查询邮箱(没有搜索过滤器),我似乎只获取内置文件夹,没有用户创建的文件夹。

这是文件夹列表我'回来了:
12/23/2009 5:12:33 PM  查找文件夹
12/23/2009 5:12:34 PM    退回:22
12/23/2009 5:12:34 PM  处理文件夹
12/23/2009 5:12:34 PM    处理:公共视图
12/23/2009 5:12:34 PM    处理:延期行动
12/23/2009 5:12:34 PM    处理:Finder
12/23/2009 5:12:34 PM    处理:Freebusy数据
12/23/2009 5:12:34 PM    处理:提醒
12/23/2009 5:12:34 PM    处理:时间表11/23/2009 5:12:34 PM    处理:快捷方式
12/23/2009 5:12:34 PM    处理:后台处理队列
12/23/2009 5:12:34 PM    处理:待办事项搜索
12/23/2009 5:12:34 PM    处理:信息存储首页
12/23/2009 5:12:34 PM    处理:日历
12/23/2009 5:12:34 PM    处理:联系人
12/23/2009 5:12:34 PM    处理:已删除的项目
12/23/2009 5:12:34 PM    处理:草稿
12/23/2009 5:12:34 PM    处理:收件箱
12/23/2009 5:12:34 PM    处理:期刊
12/23/2009 5:12:34 PM    处理:垃圾邮件
12/23/2009 5:12:34 PM    处理:备注
12/23/2009 5:12:34 PM    处理:发件箱
12/23/2009 5:12:34 PM    处理:已发送物品
12/23/2009 5:12:34 PM    处理:任务
12/23/2009 5:12:34 PM    处理:意见

代码:
       昏暗视图为新文件夹视图(65535)
        view.PropertySet = New PropertySet(BasePropertySet.IdOnly)
        view.PropertySet.Add(FolderSchema.DisplayName)
        view.Traversal = FolderTraversal.Deep  'subtree
       昏暗的结果如FindFoldersResults = ews.FindFolders(WellKnownFolderName.Root,view)

或许WellKnownFolderName.Root是错误的开始搜索的地方? 还有什么地方? 有什么想法吗?

提前谢谢!

Hi there,

I hope this is very simple... I need find the oldest email message in every user's mailbox.  More specifically, anywhere under the ARCHIVE folder in every user's mailbox (including email messages in sub-folders of that folder).  This is not a managed folder - we created it for each user.  It is not under Inbox, but rather shows at the same level as Inbox in Outlook.

I'm not an Exchange Administrator, so I'm not sure where I'm going wrong, but when I query a mailbox using a Deep traversal for all folders, (no search filter), I seem to be getting only built-in folders, and no user-created folders.

This is the folder list I'm getting back:
12/23/2009 5:12:33 PM   Find Folders
12/23/2009 5:12:34 PM     Returned: 22
12/23/2009 5:12:34 PM   Process folders
12/23/2009 5:12:34 PM     Processing: Common Views
12/23/2009 5:12:34 PM     Processing: Deferred Action
12/23/2009 5:12:34 PM     Processing: Finder
12/23/2009 5:12:34 PM     Processing: Freebusy Data
12/23/2009 5:12:34 PM     Processing: Reminders
12/23/2009 5:12:34 PM     Processing: Schedule
12/23/2009 5:12:34 PM     Processing: Shortcuts
12/23/2009 5:12:34 PM     Processing: Spooler Queue
12/23/2009 5:12:34 PM     Processing: To-Do Search
12/23/2009 5:12:34 PM     Processing: Top of Information Store
12/23/2009 5:12:34 PM     Processing: Calendar
12/23/2009 5:12:34 PM     Processing: Contacts
12/23/2009 5:12:34 PM     Processing: Deleted Items
12/23/2009 5:12:34 PM     Processing: Drafts
12/23/2009 5:12:34 PM     Processing: Inbox
12/23/2009 5:12:34 PM     Processing: Journal
12/23/2009 5:12:34 PM     Processing: Junk E-Mail
12/23/2009 5:12:34 PM     Processing: Notes
12/23/2009 5:12:34 PM     Processing: Outbox
12/23/2009 5:12:34 PM     Processing: Sent Items
12/23/2009 5:12:34 PM     Processing: Tasks
12/23/2009 5:12:34 PM     Processing: Views

Code:
        Dim view As New FolderView(65535)
        view.PropertySet = New PropertySet(BasePropertySet.IdOnly)
        view.PropertySet.Add(FolderSchema.DisplayName)
        view.Traversal = FolderTraversal.Deep  ' subtree
        Dim results As FindFoldersResults = ews.FindFolders(WellKnownFolderName.Root, view)

Perhaps WellKnownFolderName.Root is the wrong place to start the search?  Where else?  Any ideas?

Thanks in advance!

推荐答案


这篇关于EWS托管API:FindFolders找不到用户创建的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 02:45