我如何从 EWS api 获取共享邮箱邮件?

How can i get the sharedmailbox mails from EWS api?

我可以通过此 C# 代码获取共享邮箱邮件,但我想要 api 相同。EWS 服务器是否提供此功能。

FolderId SharedMailbox = new FolderId(WellKnownFolderName.Inbox,"Shared@domain.com");
ItemView itemView = new ItemView(1000);
service.FindItems(SharedMailbox,itemView);

我看到有些东西可以提供我的邮箱详细信息

https://docs.microsoft.com/en-us/exchange/client-developer/web-service-reference/findconversation-operation

<?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类似的共享邮箱邮件?

你可以用这个。可以这样提共享邮箱。

<?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>