How to use the Microsoft's remote connectivity Analyzer to detect problems connecting to source or target mailbox on office 365.
Connectivity issues can occur due to:
To verify service account access to the source or target mailbox on office 365.


This Microsoft test should give you detailed output on the cause of the connection issue to a Office 365 mailbox.