获取从特定发件人电子邮件地址收到的电子邮件的查询是什么?
我尝试过滤“From”属性的“Address”属性,这是根据 O365 Microsoft.Exchange.Services.OData.Model 命名空间的“Recipient”复杂类型。
复杂类型的 OData 过滤是这样的
/Me/Inbox/Messages?$filter=From/Address eq 'email@email.com'
但是,这会返回以下错误:
"error": {
"code": "ErrorInvalidProperty",
"message": "The property 'Address' is invalid.",
"innererror": {
"message": "The property 'Address' is invalid.",
"type": "Microsoft.Exchange.Services.OData.InvalidPropertyException",
"stacktrace": " at Microsoft.Exchange.Services.OData.SchemaExtensions.ResolveProperty(Schema schema, String propertyName)\r\n at Microsoft.Exchange.Services.OData.Model.EwsFilterConverter.GetPropertyProvider(QueryNode queryNode)\r\n at Microsoft.Exchange.Services.OData.Model.EwsFilterConverter.ConvertFilterNode(QueryNode queryNode)\r\n at Microsoft.Exchange.Services.OData.Model.EwsQueryAdapter.GetRestriction()\r\n at Microsoft.Exchange.Services.OData.Model.MessageProvider.Find(String parentFolderId, MessageQueryAdapter queryAdapter)\r\n at Microsoft.Exchange.Services.OData.Model.FindMessagesCommand.InternalExecute()\r\n at Microsoft.Exchange.Services.OData.ODataCommand`2.Execute()\r\n at Microsoft.Exchange.Services.OData.ODataTask.Execute(TimeSpan queueAndDelayTime, TimeSpan totalTime)"
}
}