Office365 SMTP Connection Timed Out

Whitelist your web server outgoing IP on Office 365 connection filter.

EAC > Protection > Connection filter > Allow list.
Configure inbound connector Office 365 by specifying the source IP as your web server IP. Which will bypass connection filtering on Office 365 if it’s not blacklisted.

Please verify and make sure the web server IP is not blacklisted on any of the Microsoft partner blacklists

http://mxtoolbox.com/blacklists.aspx

If the IP is blacklisted on any one of the Microsoft partner RBL, connections from the IP will not be accepted by office 365. Remove the IP from blacklist if in case blacklisted.

Microsoft RBL

https://blogs.technet.microsoft.com/eopinsights/2015/10/09/dnsbls-rbls-and-office-365/

EAC > Mail flow > Connector > Direction 'Your org e-mail server' to 'Office 365'

If it fails on port 587, possibly due to certificate or TLS version issue, try relaying through the port 25 with SMTP authentication.

If you are not using SMTP authentication, specify the smart host as Office 365 MX record for the respective domain and use port no 25

Smart host: domain-com.mail.protection.outlook.com

port:25

SMTP authentication: Null