问题
Gmail settings allows to set a star of a different type among several ("yellow-star", "red-star", "green-check", ...).
The number of star types that can be used can be set in Gmail settings menu.
Google Apps Script's Gmail services includes a GmailMessage::isStarred that just returns a Boolean. It does not provide the type of star that is set.
Will this function be modified, or an other be added, to return which type of star is set to a message ?
回答1:
It seems that wishing for that to happen. The best place is fill an "Enhancement request" on Apps Script issue tracker.
Anyway, since we're on this subject, you can get all messages of a specific star by issue the appropriate search on gmail.
回答2:
GmailApp.search('label:^ss_sg')
seems to work for getting green stars only. The various codes are in the answer to this question
来源:https://stackoverflow.com/questions/10629130/will-a-function-be-added-to-gmail-app-script-api-to-get-the-type-of-star-assigne