I just tried using the class with Office 365 SMTP server.
It worked well.
What you need is to set the ssl variable to 0 when you set start_tls .
I have just added a new example script here below so you can try it your.
Can you please try this script and let me know if it works well for you too?