0
我想通過EmailAddress搜索聯繫人。使用下面的代碼通過EmailAddress搜索聯繫人EWS
<m:FindItem Traversal="Shallow">
<m:ItemShape>
<t:BaseShape>AllProperties</t:BaseShape>
<t:AdditionalProperties>
<t:FieldURI FieldURI="contacts:DisplayName" />
</t:AdditionalProperties>
</m:ItemShape>
<m:Restriction>
<t:Or>
<t:Contains ContainmentMode="Substring" ContainmentComparison="IgnoreCase">
<t:IndexedFieldURI FieldURI="contacts:EmailAddress" FieldIndex="EmailAddress1" />
<t:Constant Value="test" />
</t:Contains>
<t:Contains ContainmentMode="Substring" ContainmentComparison="IgnoreCase">
<t:IndexedFieldURI FieldURI="contacts:EmailAddress" FieldIndex="EmailAddress2" />
<t:Constant Value="test" />
</t:Contains>
<t:Contains ContainmentMode="Substring" ContainmentComparison="IgnoreCase">
<t:IndexedFieldURI FieldURI="contacts:EmailAddress" FieldIndex="EmailAddress3" />
<t:Constant Value="test" />
</t:Contains>
</t:Or>
</m:Restriction>
<m:ParentFolderIds>
<t:DistinguishedFolderId Id="contacts" />
</m:ParentFolderIds>
</m:FindItem>
它對一些聯繫人工作正常。但是,我應該怎麼尋找,如果一些聯繫人的電子郵件地址的值是
<t:EmailAddresses>
<t:Entry Key="EmailAddress1">/o=Server/ou=Exchange Administrative Group/cn=Recipients/cn=Testdeb</t:Entry>
<t:Entry Key="EmailAddress2">[email protected]</t:Entry>
</t:EmailAddresses>
,而不是簡單的字符串(EmailAddress1 VS EmailAddress2) 我不知道,如何使EmailAddress1值搜索從該位置