0
谷歌Apps脚本Gmail的脚本 - label.getUnreadCount()问题
https://developers.google.com/apps-script/reference/gmail/gmail-label
getUnreadCount()
// log the number of unread threads labeled with MyLabel
var label = GmailApp.getUserLabelByName("MyLabel");
Logger.log(label.getUnreadCount());
Gets the number of unread threads tagged with this label.
,当我试图提供的示例代码,它返回不同的读值。
从电子邮件,它显示未读的17,但日志文件显示12
任何想法?
玩过这个方法,并测试了几个标签和不同的场景。该方法返回正确的结果。确保您正在运行脚本并使用您检查标签的相同电子邮件进行身份验证。 – KRR