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