Outlook messages¶
Mail is the deepest Outlook resource: send, reply, move and delete; walk folders
and paginate; tag with categories; and export the lot. Part of the
Outlook tour, which explains the model, permissions and the
shared send_mail / draft idioms.
| What | File | Notes |
|---|---|---|
| Send a message | send.py |
Subject, body, recipients |
| Reply / forward / move / copy | lifecycle.py |
The full message lifecycle |
| Folders | folders.py |
Create, navigate, empty, mark read |
| Search | search.py |
KQL and $filter (mutually exclusive) |
| Paginate | pagination.py |
$top + $skip over thousands |
| Inbox rules | inbox_rules.py |
Automate handling |
| Categories | categories.py |
Master colour labels |
| Mailbox settings | mailbox_settings.py |
Automatic replies (OOF) |
| Mail tips | mail_tips.py |
Pre-flight OOF / size checks |
| Attachments | attachments.py |
Add, list, download |
| Send with a large attachment | send_with_large_attachment.py |
Upload session |
| Large messages | large_messages.py |
Over a size threshold |
| Export a folder to CSV | export_folder_csv.py |
Data pipeline |
| Export a folder to JSON | export_json.py |
Data pipeline |
Export MIME (.eml) |
export_mime.py |
One message |
Import MIME (.eml) |
import_mime.py |
Draft from a saved file |
| Export attachments | export_attachments.py |
Folder → local disk |
| Export a folder concurrently | export_mail_async.py |
Async |
| Archive old messages | archive_old.py |
Moves into "Archive" |
| Clean up old messages | cleanup_old.py |
Dry-run first |