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