By default, Office 365 client such as Outlook uses Exchange Autodiscover to connect to the Office 365 email account. However, in some cases you need to connect to Office 365 using IMAP or POP protocol. Below is the list of email setting for Office 365

SMTP

To send emails using Office365 server enter these details:

SMTP Host: smtp.office365.com
SMTP Port: 587
SSL Protocol: OFF
TLS Protocol: ON
SMTP Username: (your Office365 username)
SMTP Password: (your Office365 password)

Note: Make sure the “from” email/account is using your Office365 email address.

POP

To fetch mail from Office365 server enter these details:

POP3 Host: outlook.office365.com
POP3 Port: 995
TLS Protocol: ON
POP3 Username: (your Office365 username)
POP3 Password: (your Office365 password)

IMAP

To fetch mail from Office365 server using IMAP protocol instead, enter these details:

IMAP Host: outlook.office365.com
IMAP Port: 993
Encryption: SSL
IMAP Username: (your Office365 username)
IMAP Password: (your Office365 password)

Error Messages

Below are some error messages that may occurs during the setup

Connection timed out
Could not connect to…
Testing connection, this can take a while… 

This usually means required ports are blocked on your server in the firewall. You may need to your hosting/internet provider to verify and ask to unblock required ports (587, 995 and/or 993) to allow TCP connections.

Password error: Logon failure: unknown user name or bad password.

Office365 doesn’t recognize your username or your password is incorrect. Double-check both the username and password. Passwords are case sensitive.

554 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied

Make sure the “From” email is set to the SMTP email address and that the “From” name is NOT set to an email address.