This looks like a server-side issue. Unfortunately, Exchange Online's IMAP server is surprisingly buggy. To determine what's going on, create a server log using Imap object's LogWriter property (as decribed at https://www.rebex.net/kb/logging/) and post the relevant part that precedes the error.
↧