Export Outlook.com emails to Excel
Connection settings, credentials and the limits that break exports — for Outlook.com.
Connection settings
| Setting | Value |
|---|---|
| IMAP host | outlook.office365.com |
| Port | 993 |
| Encryption | SSL/TLS |
| Access | read-only |
Credentials
- 1. Enable 2-step verification
- 2. Create an app password in Security settings
- 3. Connect to outlook.office365.com:993 SSL
Limits to expect
- Microsoft is retiring basic auth for many tenants
- App passwords are unavailable when your organisation blocks them
- Shared mailboxes need delegated access
Export command
python mail_to_excel.py --host outlook.office365.com --port 993 --user you@example.com --days 31 --out mail.xlsx
Next step
The universal IMAP guide · Exports by role · Ready script ($3)
FAQ
App password is not offered
Your tenant requires OAuth or a desktop export; ask IT for an app registration.
Does the export touch read flags?
No — use read-only mode.
Related guides
- Universal IMAP exportThe method that works for every provider.
- Exports by roleColumns and pitfalls for 20 professions.