Yes, this is possible – use the ImapMessageSet
argument to pass the desired message range.
Example:
// number of newest messages to retrieve
int limit = 10;
// calculate the range
int last = _client.CurrentFolder.TotalMessageCount;
int first = Math.Max(1, last - limit);
// construct an ImapMessageSet
ImapMessageSet set = new ImapMessageSet();
set.AddRange(first, last);
// retrieve the messages
messages = _client.GetMessageList(set, ImapListFields.Envelope
| ImapListFields.MessageStructure
| ImapListFields.Body);