I have recently setup the classic terminal email client- mutt, very happy. This repo for Office 365 helped me, not only with setting up O365 but as an example for others, also keybinds for Archive folders etc https://github.com/ork/mutt-office365
Will add I am yet to properly render html emails though.
How is it your task to render html emails? Shouldn't the software do that?