Below are the recommended settings of Office365 configured in application.
Server name : outlook.office365.com
User name: <your user name>
Email: <Give the required email address>
This works most cases, if not, check connectivity (ping <servername> and port availability <telnet <servername> 993).
In some cases, though credentials are fine, it says authentication error, such case change user account and check, that works.
Server name : smtp.office365.com
Reply to Email Address : <Give the required email address>
Protocol : SMTP
TLS Enabled : Yes
Authentication Required : yes
Make sure, you restart the application service after making these changes.