Random SMTP authentication failures to Office 365 (Exchange)

kdkoa
New Contributor III

Hey all-

I have a python script running in databricks notebook which uses smtplib to connect and send email via our Exchange online server. At random times, it will start getting authentication failures and I can't figure out why. I've confirmed that the email and password are correct, and the user on the Office 365 side is set up correctly. I'm not seeing any account lockouts, or email thresholds being hit, just errors that say 'bad username or password.'

Has anyone else run into this?