I used to use davmail to get my email from an Exchange server, and it worked flawlessly.
Then we switched to an O365 email solution. I'm sure it still uses exchange on the backend, but I don't know microsoft stuff so correct me if I am wrong.
But ever since the switch from a selfhosted exchange server to O365, davmail has been useless.