Problem setting up SSMTP with Office 365

Hi guys!

Im trying to setup my box so it can send its emails through Office 365 SMTP. I spent 8 hours yesterday trying to configure sendmail to do this, but I gave up.

Now Im trying to do it with SSMTP and I followed this guide to configure it How to install and configure sSMTP on CentOS / Fedora / Redhat | TechGyaan

This is my configuration:

root=email@mymail.com
mailhub=pod51011.outlook.com:587
AuthUser:User
AuthPass:Pass
FromLineOverride=YES
UseSTARTTLS=YES

But then in the logs I get

Jan  3 08:39:07 isvahlrtk01 sSMTP[7263]: Unable to connect to "pod51011.outlook.com" port 587.
Jan  3 08:39:07 isvahlrtk01 sSMTP[7263]: Cannot open pod51011.outlook.com:587

What could be happening?