Export and save email

How to Export Emails from Outlook 365 and the New Outlook

Updated 3 min read

On this page
  1. Export from classic Outlook
  2. Export from new Outlook
  3. Use mailmd for a Markdown email archive
  4. Save one email instead

Export a Microsoft 365 mailbox to a PST file to save it as an Outlook archive. A PST, or Outlook Data File, stores email and other selected Outlook items in a file on your computer. The steps depend on whether you use classic Outlook for Windows or new Outlook. New Outlook also supports PST export.

For a local archive you can read as individual files, mailmd is another option. It saves each email as a Markdown file, a plain-text file with simple formatting, on your computer, but it does not create PST files. Choose Outlook’s export when you need a PST; choose mailmd when you want a searchable, plain-text email archive.

Export from classic Outlook #

Classic Outlook’s export wizard creates a PST. Before exporting a Microsoft 365 or Exchange mailbox, check that Outlook has downloaded the older messages you need. Outlook stores a local copy of mailbox data in Cached Exchange Mode, and the date range for that copy can be limited. Set Mail to keep offline to All, then allow synchronization to finish before starting the export. Microsoft explains the cache setting and how to address mail that has not synchronized in its Cached Exchange Mode guidance and mailbox synchronization instructions.

Select File → Open & Export → Import/Export. Choose Export to a file, then Outlook Data File (.pst). Select the folder you want, or select the mailbox’s top-level entry and enable Include subfolders to export its folders. Choose a destination and filename, then finish the wizard. Microsoft’s PST export instructions cover these steps.

Selecting a folder exports only that folder. Check the selection carefully if you need the entire mailbox, and open the finished PST to verify its contents before deleting any mail or losing access to the account.

Export from new Outlook #

New Outlook for Windows supports PST export through Settings → Files → Export → Get started, as described in Microsoft’s export instructions. Select the mailbox or folder and follow the export prompts.

If the wizard asks whether to copy or move messages, choose copying so the originals stay in the mailbox as a backup. The move option described in a University of Toronto walkthrough sends source items to Deleted Items. Interface wording and available choices can vary, so review each prompt before continuing.

Microsoft’s feature comparison says PST support in new Outlook remains limited. If the export option is missing or the result does not meet your needs, check your Outlook version and organizational restrictions with your Microsoft 365 administrator.

Use mailmd for a Markdown email archive #

For an archive made of readable files rather than one Outlook data file, mailmd is the recommended option. It is a free, open-source command-line tool that copies messages into a folder on your computer, with one Markdown file per message. It supports Microsoft 365 through Microsoft Graph, Microsoft’s service for accessing account data. Connecting this way requires an OAuth app you create in Microsoft Entra so mailmd can request access to your account.

Install mailmd and connect your Outlook account on macOS or Linux, or in Windows Git Bash:

curl -fsSL https://raw.githubusercontent.com/vincentsch/mailmd/main/install.sh | sh
mailmd connect outlook --client-id <id>
mailmd sync

Create the OAuth app in Microsoft Entra and use its client ID when prompted. mailmd saves the archive under ~/mail/<account>. Its setup instructions and code provide the project details.

mailmd connects with permission to read mailbox data. It does not mark messages as read, move or delete mailbox messages, or send mail. It saves attachments beside messages, arranges folders and years as directories, and writes an index.jsonl file that scripts can filter. The archive is not a mail client, and mailmd does not create PST or PDF files from messages. You can search the files with a text editor or command-line tools, then run mailmd sync again to add new mail.

Save one email instead #

If you only need a single message, use the message’s save or download option rather than exporting a mailbox. In new Outlook, select or open the message and choose More actions → Save as. In Outlook on the web, choose More actions → Download. Microsoft’s message-saving instructions describe the available formats; PDF is a document output, not a mailbox archive.

Free and open source

Try mailmd

mailmd is a free command-line tool that copies your email into Markdown files on your computer, one file per message. It works with any IMAP mailbox, and with Gmail and Outlook through their own APIs.

Install

$ curl -fsSL https://raw.githubusercontent.com/vincentsch/mailmd/main/install.sh | sh

Set it up with your coding agent

Set up mailmd so you can read my email. Use https://github.com/vincentsch/mailmd: read its AGENTS.md and follow the steps. Connect my mailbox and run the first sync. Then show me where the files are.

More on export and save email