SORT is not supported by remote server. How to apply sort?
If SORT extension isn't supported by your server there is not much you can do.
The only option is to use Mail.dll .NET IMAP client to download results and sort emails locally - use Linq or similar solution.
Consider using Imap.GetMessageInfoByUID or even Imap.GetEnvelopeByUID (if you are not interested in attachmets):
VAT: PL 5213195875
02-707, Warsaw Poland