Added Gmail label support

This commit is contained in:
M66B
2020-06-25 09:14:05 +02:00
parent 8454f981ad
commit 058cfb031f
18 changed files with 2560 additions and 16 deletions

View File

@@ -944,6 +944,20 @@ public class MessageHelper {
return thread;
}
String[] getLabels() throws MessagingException {
//ensureMessage(false);
List<String> labels = new ArrayList<>();
if (imessage instanceof GmailMessage)
for (String label : ((GmailMessage) imessage).getLabels())
if (!label.startsWith("\\"))
labels.add(label);
Collections.sort(labels);
return labels.toArray(new String[0]);
}
Integer getPriority() throws MessagingException {
Integer priority = null;