Reputation: 217
I use mailkit library to read imap mails. I want to get mail with it's size. In Pop3 I can read mail size with;
clientPop.GetMessageSize("messageId");
In Imap,how can I do that?
Upvotes: 0
Views: 1463
Reputation: 38528
The way to get message metadata in IMAP is to use the Fetch()
method on the folder. If you want to get the size of each message, you could do:
foreach (var summary in inbox.Fetch (0, -1, MessageSummaryItems.Size)) {
Console.WriteLine ("The size of message {0} is {1}", summary.Index, summary.Size.Value);
}
Upvotes: 4