Hello explorer03,
Good day!
Thank you for posting to Microsoft Community. We are happy to help you.
Based on you description i would like to inform you below is a comparison of each configuration option and feature we support.
And i can see that the setting from python doesn't match any features Microsoft suggest setting up application to send email using Microsoft 365 or Office 365. It looks like phyton doesn't use TLS. I suggest you contact phyton support and show them our feature we suggest to any application.
Please feel free to let us know if there are any questions or if we've got you wrong. We will keep assisting you based on the information you provide. We sincerely appreciate your patience and cooperation.
Thanks for your precious time.
Sincerely,
Eben Ezer Tres | Microsoft Community Moderator