POP settings:
Server name: outlook.office365.com
Port: 995
Connection Security: SSL/TLS
User Name: full email address
Authentication Method: OAuth2
IMAP settings:
Server name: outlook.office365.com
Port: 993
Connection Security: SSL/TLS
User Name: full email address
Authentication Method: OAuth2
Office 365 SMTP settings:
Description: full email address
Server name: smtp.office365.com
Port: 587
Connection Security: STARTTLS
User Name: full email address
Authentication Method: OAuth2
Note: For accessing the SMTP need to enable the Authenticated SMTP in admin console.
1. Open the Microsoft 365 admin center and go to Users > Active users.
2. Select the user, and in the flyout that appears, select Mail.
3. In the Email apps section, select Manage email apps.
4. Verify the Authenticated SMTP setting: unchecked = disabled, checked = enabled.
5. When you're finished, select Save changes.