I have following code which is supposed to open a connection to a Microsoft Exchange server via IMAP:
Folder inputFolder = null; Folder doneFo