如何使用Microsoft Graph API从用户电子邮件中获取发送的属性值

时间:2019-04-10 23:22:40

标签: javascript microsoft-graph

我正在使用我的应用程序中的Microsoft Graph API。我希望能够看到用户何时响应他/她收到的消息。截至目前,邮件的时间为sentreceived是相同的。我假设sentTime确实是将原始电子邮件发送给用户的时间。相反,我想获得用户实际回复电子邮件的时间。我该怎么办?我将在下面发布我的代码。

enter image description here

mail.js

// Initialize Graph client
const client = graph.Client.init({
  authProvider: (done) => {
    done(null, accessToken);
  }
});

try {
  // Get the 10 newest messages from inbox
  const result = await client
    .api('/me/mailfolders/inbox/messages?$search= "from:@gmail.com"')
    .top(50)   .select('subject,from,receivedDateTime,isRead,sentDateTime')
     .orderby('receivedDateTime DESC')
    .count(true)
    .get();

}catch (err) {
      console.error(err);
      parms.message = 'Error retrieving messages';
  }
}

0 个答案:

没有答案