有没有办法在EWS中搜索收件人? 我使用此限制来搜索发件人:
<IsEqualTo>
<FieldURI FieldURI="message:From" />
<FieldURIOrConstant>
<Constant Value="(searchEmailAddress)" />
</FieldURIOrConstant>
</IsEqualTo>
<IsEqualTo>
<FieldURI FieldURI="message:Sender" />
<FieldURIOrConstant>
<Constant Value="(searchEmailAddress)" />
</FieldURIOrConstant>
</IsEqualTo>
但我找不到搜索收件人的方法。
答案 0 :(得分:0)
DisplayTo是FindItem操作返回的唯一收件人属性。因此,要在DisplayTo上搜索,请执行以下操作:
<m:FindItem Traversal="Shallow">
<m:ItemShape>
<t:BaseShape>AllProperties</t:BaseShape>
</m:ItemShape>
<m:IndexedPageItemView MaxEntriesReturned="1" Offset="0" BasePoint="Beginning" />
<m:Restriction>
<t:Contains ContainmentMode="Substring" ContainmentComparison="IgnoreCase">
<t:FieldURI FieldURI="item:DisplayTo" />
<t:Constant Value="Somebody" />
</t:Contains>
</m:Restriction>
<m:ParentFolderIds>
<t:DistinguishedFolderId Id="inbox" />
</m:ParentFolderIds>
</m:FindItem>