1. Login your email account to Thunderbird
Set manual configuration in thunderbird account as follows:
INCOMING SERVER
Protocol: IMAP
Hostname: outlook.office365.com
Port: 993
Connection security: SSL/TLS
Authentication method: OAuth2
Username: your outlook email address
OUTGOING SERVER
Hostname: smtp.office365.com
Port: 587 or 464
Connection security: STARTTLS
Authentication method: OAuth2
Username: your outlook email address
2. Add add-on “ImportExportTools NG”
Top-right menu –> Add-on and Themes –> Search and add the add-on “ImportExportTools NG”


3. Sync the email folders locally
File –> Subscribe... –> Tick all the folders that you would like to have a copy locally


4. Export all email messages in EML format
Right click the folders –> ImportExportTools NG –> Export all messages in the folder –> EML format
An index.html and a folder messages with all email messages in .eml format will then be exported.

