Microsoft's retirement of basic authentication / OAUTH2 and RT

Hey guys,
I wrote a simple script to catch my emails from O365. It’s no rocket science and striped down for my specific needs but maybe it will help you to get an idea.

Please let me know in case you have improvements.
Regards,
Manuel