Below are the recommended settings of Office365 configured in application.
Incoming:
Server name : outlook.office365.com
User name: <your user name>
Password: <password>
Email: <Give the required email address>
Protocol: IMAPS
TLS: No
Port:993
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.
Outgoing:
Server name : smtp.office365.com
Reply to Email Address : <Give the required email address>
Protocol : SMTP
Port: 587
TLS Enabled : Yes
Authentication Required : yes
Make sure, you restart the application service after making these changes.