Still an issue years later, I’m starting to wonder if this app is still in active development.
'----------IMAP----------\n' +
'connect <mailcore::IMAPSession:0x7ffd067dbed0>\r\n' +
'* OK The Microsoft Exchange IMAP4 service is ready. [QgBOADAAUABSADAAMwBDAEEAMAAwADIAOAAuAG4AYQBtAHAAcgBkADAAMwAuAHAAcgBvAGQALgBvAHUAdABsAG8AbwBrAC4AYwBvAG0A]\r\n' +
'ssl connect outlook.office365.com 993 2\r\n' +
'OpenSSL version: OpenSSL 1.1.0f 25 May 2017\r\n' +
'1 CAPABILITY\r\n' +
'* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS MOVE ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+\r\n' +
'1 OK CAPABILITY completed.\r\n' +
'connect ok\r\n' +
'login\r\n' +
'2 AUTHENTICATE XOAUTH2
'2 OK AUTHENTICATE completed.\r\n' +
'3 CAPABILITY\r\n' +
'* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS MOVE ID UNSELECT CLIENTACCESSRULES CLIENTNETWORKPRESENCELOCATION BACKENDAUTHENTICATE CHILDREN IDLE NAMESPACE LITERAL+\r\n' +
'3 OK CAPABILITY completed.\r\n' +
'4 NAMESPACE\r\n' +
'4 BAD User is authenticated but not connected.\r\n' +
'fetch namespace failed\r\n'