仅获取新邮件的历史事件? [英] Getting history events for just new messages?
本文介绍了仅获取新邮件的历史事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想监视用户的Gmail帐户中是否有新消息,并采取适当的措施.有没有办法只获取新消息的历史事件,而没有为电子邮件加注星标或更改其标签等内容?
I'd like to monitor a users gmail account for new messages and take an appropriate action. Is there a way to fetch the history events for just new messages but NOT for things like starring an email or changing its labels, etc.?
推荐答案
所以我最终使用messages.list并存储了最新消息的时间戳.然后,在随后对messages.list的调用中,我将提供"after:theMostRecentTimestampIKnowOf"查询,以查找自上次同步以来的新消息.
So I ended up using messages.list and storing the timestamp of the most recent message. Then on subsequent calls to messages.list I'd supply a query of "after:theMostRecentTimestampIKnowOf" to find new messages since the last time we synced.
这篇关于仅获取新邮件的历史事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文