Neil
Neil

Reputation: 3

Is there any way to retrieve labels or folder ID in IMAP MailKit

I am using MailKit IMAP to retrieve messages from Email Server(GMail). I have to cached these messages into my local system so that user can access messages Offline.Currently I am getting all folders or labels that Email Server has.But I do not get label ID or folder ID that is correspond to each message.I have read Google Gmail API that says each label or folder has ID and one or more labels can be applied on a single message e.g a message may be in Inbox as well as in Personal labels.I just want to know how many labels are applied on a single message and what are the IDs of these labels.

Upvotes: 0

Views: 1462

Answers (1)

jstedfast
jstedfast

Reputation: 38643

You can get this information from folder.Fetch (range, MessageSummaryItems.GMailLabels);

Upvotes: 1

Related Questions