【发布时间】:2021-08-31 09:06:39
【问题描述】:
我正在使用 Graph API 处理邮箱消息。如何将消息分类为已发送或已接收?
我找到了类似的查询,Is there a way to differentiate an inbound (received) versus outbound (sent) email/message?
谢谢
【问题讨论】:
标签: outlook microsoft-graph-api office365 ms-office message
我正在使用 Graph API 处理邮箱消息。如何将消息分类为已发送或已接收?
我找到了类似的查询,Is there a way to differentiate an inbound (received) versus outbound (sent) email/message?
谢谢
【问题讨论】:
标签: outlook microsoft-graph-api office365 ms-office message
您可以尝试以下步骤,看看这是否有助于您的方案:
Get the mail folder collection 直接在登录用户的根文件夹下。返回的集合包括根目录下的所有邮件搜索文件夹。
GET /me/mailFolders
在用户邮箱的特定文件夹中获取邮件 - 为此使用 list messages endpoint。
GET /me/mailFolders/{id}/messages
【讨论】:
您能否尝试以下查询,看看这是否有助于您的方案:
识别发送的消息 - https://graph.microsoft.com/v1.0/me/messages?$filter=sender/emailAddress/address eq '您的邮件地址'
识别收到的消息 - https://graph.microsoft.com/v1.0/me/messages?$filter=sender/emailAddress/address ne '您的电子邮件地址'
【讨论】: