我可以通过这个C#代码获取sharedmailbox邮件,但我想要api相同。这是EWS服务器提供的。
FolderId SharedMailbox = new FolderId(WellKnownFolderName.Inbox,"Shared@domain.com");
ItemView itemView = new ItemView(1000);
service.FindItems(SharedMailbox,itemView);
我看到有些东西可以提供我的邮箱详情
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">
<soap:Header>
<t:RequestServerVersion Version="Exchange2010_SP1" />
</soap:Header>
<soap:Body>
<m:FindConversation>
<m:IndexedPageItemView BasePoint="Beginning" MaxEntriesReturned="1" Offset="0"/>
<m:ParentFolderId>
<t:DistinguishedFolderId Id ="inbox"/>
</m:ParentFolderId>
</m:FindConversation>
</soap:Body>
</soap:Envelope>
我希望我的共享邮箱邮件也一样。
共享邮箱邮件是否有这样的api?
答案 0 :(得分:0)
您可以使用它。您可以像这样提及共享邮箱。
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<t:RequestServerVersion Version="Exchange2013" />
</soap:Header>
<soap:Body>
<m:FindConversation>
<m:IndexedPageItemView MaxEntriesReturned="1" Offset="0" BasePoint="End" />
<m:ParentFolderId>
<t:DistinguishedFolderId Id="inbox" >
<t:Mailbox>
<t:EmailAddress>sharedmail@mail.com</t:EmailAddress>
</t:Mailbox>
</t:DistinguishedFolderId>
</m:ParentFolderId>
</m:FindConversation>
</soap:Body>
</soap:Envelope>