使用EWS打开邮箱文件夹 [英] Open Mailbox Folder using EWS

查看:220
本文介绍了使用EWS打开邮箱文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

 

我正在尝试打开邮箱下的文件夹。有没有具体的方法这样做?我使用的代码是:

I am trying to open a folder under a mailbox. Is there a specific way of doing this? The code I am using is:

私人
静态
FindItemsResults < Microsoft.Exchange.WebServices.Data。 项目 >
FindResults(
string
emailFromFilter,
ExchangeService
service )

private static FindItemsResults<Microsoft.Exchange.WebServices.Data.Item> FindResults(string emailFromFilter, ExchangeService service)

{

 

 

ItemView
view =
new
ItemView (10);

ItemView view = new ItemView(10);

 

 

FindItemsResults < Microsoft.Exchange.WebServices.Data。 项目 >
findResults =
null ;

FindItemsResults<Microsoft.Exchange.WebServices.Data.Item> findResults = null;

 

 

邮箱
mbox =
new
邮箱 @ IMail@domain.com );

Mailbox mbox = new Mailbox(@IMail@domain.com);

 

 

FolderId
mboxFolder =
new
FolderId WellKnownFolderName 。收件箱,
mbox);

FolderId mboxFolder = new FolderId(WellKnownFolderName.Inbox, mbox);

findResults = service.FindItems(mboxFolder,view);

findResults = service.FindItems(mboxFolder, view);

 

 

 

返回
findResults;

return findResults;

}

 

这打开邮箱很好,但我似乎无法导航到文件夹。

Which opens the mailbox fine, however I can't seem to navigate to the folders.

 

任何人都可以帮助我吗?

Can anyone please help me?

 

谢谢,

推荐答案

一旦你在某个root用户启动了,你的情况就是邮箱。你需要使用方法递归地遍历文件夹树

http://msdn.microsoft.com/en-us/library/microsoft .exchange.webservices.data.exchangeservice.f indfolders%28EXCHG.80%29.aspx
。它会返回您在通话中由Id指定的文件夹中的所有文件夹。

Hi, once you've started in some root, in your case the mailbox. You need to go throught the folder tree recursively using method http://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.exchangeservice.findfolders%28EXCHG.80%29.aspx . It returns you all folders that are located in the folder specified by Id in the call.

 


这篇关于使用EWS打开邮箱文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆