Setting for outlook office 365 email in Thunderbird

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.

Use the Microsoft 365 admin center to enable or disable SMTP AUTH on specific mailboxes

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.