Written by Jennifer Walsh. Reviewed for technical accuracy by Shubham Dixit, Independent Expert in Email Forensics and Data File Conversion. Updated 18 September 2026.
Shubham is an independent external reviewer and not an employee of PCDOTS.
Quick answer. Apple Mail keeps your mail as plain-text EMLX and MBOX files, so the addresses are easy to pull, for free. The quickest built-in way is the Previous Recipients list under the Window menu. For every address in a mailbox, export it to MBOX and run a one-line Terminal grep that dedups them. A tool does the same on Windows in a window.
On this page
- Where are email addresses stored on a Mac?
- How do you get them from the Previous Recipients list?
- How do you extract every address from the MBOX with Terminal?
- How do you pull From, To and Cc with Python?
- How do you extract them on Windows with a tool?
- Which method should you use?
- Frequently asked questions
Where are email addresses stored on a Mac?
On a Mac, the addresses you’ve dealt with sit in three places. Knowing which one you want makes the pull quick.
The three places
- Contacts. The address book, holding the people you saved on purpose.
- Previous Recipients. Apple Mail’s own list of everyone you’ve written to, even the ones you never saved.
- The mail itself. Apple Mail stores messages as plain-text EMLX files in your Library, and exports them as MBOX, so the From, To and Cc lines are right there.
Because the mail is plain text, pulling the addresses is a free job. The routes below start with the easiest, the built-in list, then the Terminal for every address in a mailbox.
Addresses live in three places, and the plain-text mail makes them easy to pull.
“When I need the addresses out of Apple Mail, I don’t reach for software first. If you just want the people you’ve corresponded with, the Previous Recipients window hands you the list. If you want every address in a mailbox, export it to MBOX and run one grep line, and sort drops the duplicates. The mail is plain text, so it’s a two-minute job on the Mac itself. I only use a tool when the mailbox has moved to Windows, or someone wants a tidy report. And a plain reminder, pull your own contacts, not a stranger’s for spam.” Shubham Dixit, Email Forensics reviewer (draft, pending approval)
How do you get them from the Previous Recipients list?
You get the addresses you’ve written to from Apple Mail’s Previous Recipients list. It’s the fastest way, and it’s built in, so there’s nothing to install.
Here are the four steps.
- In Apple Mail, open the Window menu, then Previous Recipients.
- A list opens of everyone you’ve emailed, saved contacts or not.
- Sort or search the list, then select the addresses you want.
- Click Add to Contacts, or copy them and paste into a text file.
This list covers the people you’ve sent mail to. For the senders in a mailbox as well, the Terminal route below reads the actual From, To and Cc lines.
How do you extract every address from the MBOX with Terminal?
You extract every address from a mailbox by exporting it to MBOX, then running one grep line in Terminal. Because the MBOX is plain text, grep finds all the addresses, and sort drops the duplicates. This is the Mac way, with no extra app.
Here are the three steps.
- In Apple Mail, right-click a mailbox, then Export Mailbox, then save the .mbox.
- Open Terminal, then use
cdto go to the exported folder. - Run the line below. It writes a clean, deduped list to addresses.txt.
grep -rhoiE '[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}' . | sort -u > addresses.txt
On the Mac I export the mailbox, then that one grep line pulls every address and sort -u drops the duplicates. This reads the entire mailbox, so it catches senders and recipients, not just the people you wrote to.
A few refinements. Exporting first is the clean route, because it drops the .mbox in a normal folder that Terminal reads without any fuss. You can also point grep straight at ~/Library/Mail, where the EMLX files live, but macOS guards that folder, so give Terminal Full Disk Access in System Settings first. To keep only the senders, pipe the results through grep -i '^From:' before the address pattern, and wc -l addresses.txt counts what you pulled.
Export the mailbox, grep the addresses, sort to dedup, into a text file.
How do you pull From, To and Cc with Python?
You pull the From, To and Cc addresses cleanly with Python, using its built-in mail modules. This reads the headers properly, so you get real addresses, not stray text that looks like one.
Point Python’s mailbox module at the exported .mbox, loop the messages and read the From, To and Cc fields with the email module’s address parser. A set() keeps them unique, and you write the result to a file. It’s a few lines, and it lets you filter by field or domain.
How do you extract them on Windows with a tool?
You extract them on Windows with a tool that reads the exported MBOX in a window. It suits people who’ve moved the mailbox to a PC, or who’d rather click than type a command.
PCDOTS MBOX Converter loads the Apple Mail MBOX and pulls the addresses from the From, To, Cc or other fields into a text file, on Windows, deduped. You choose the fields, and the free trial previews the list first. Follow these four steps.
- Install and run PCDOTS MBOX Converter, then Open your Apple Mail MBOX files.
- Preview the loaded mail in the panel.
- Choose Extract, then Email Addresses, and the fields you want.
- Select a destination, then Extract to save the text file.
The tool route, addresses pulled from an Apple Mail MBOX into a text file.
Here are the first steps with the screens.
Step 1. Install and run PCDOTS MBOX Converter.

Step 2. Open your Apple Mail MBOX files.

Step 3. Choose Extract, then Email Addresses.

Related reading, our guides to extract email addresses from MBOX files and import Mac Mail to Gmail. To read a file first, the free MBOX viewer opens the mailbox.
Match the pull to what you need, the people, the mailbox, clean fields or a window.
Which method should you use?
Use Previous Recipients for the people you’ve written to, Terminal for every address in a mailbox and a tool on Windows.
| Method | Best for | Good to know |
|---|---|---|
| Previous Recipients | People you’ve emailed | Free, built in, on the Mac |
| Terminal grep | Every address in a mailbox | Free, exports MBOX, dedups |
| MBOX Converter | A window, on Windows | Choose fields, saves to text |
Key takeaways
- On a Mac, addresses live in Contacts, Previous Recipients and the plain-text mail files.
- Previous Recipients under the Window menu is the fastest built-in way, for free.
- For every address, export to MBOX and run a one-line grep with sort -u to dedup.
- A tool reads the MBOX on Windows and saves the addresses to a text file.
Frequently asked questions
Does Apple Mail have a built-in way to see my addresses?
Yes. Open the Window menu, then Previous Recipients, for a list of everyone you’ve emailed. Select them and Add to Contacts, or copy them to a text file.
Where does Apple Mail store the addresses?
In the mail itself. Apple Mail keeps messages as plain-text EMLX files in your Library, and exports them as MBOX, so the From, To and Cc lines hold the addresses.
How do I extract addresses from an exported MBOX?
Export the mailbox, open Terminal in that folder, then run a grep line with an email pattern piped to sort -u. It writes a clean, deduped list to a text file.
Can I do this on Windows?
Yes. Copy the exported MBOX to the PC, then a tool like the PCDOTS MBOX Converter reads it and pulls the addresses into a text file, with the fields you choose.
Do I get duplicates?
Not if you dedup. The grep line uses sort -u, and Python uses a set, so every repeated address is dropped and only one copy remains.
Should I back up first?
Yes, it’s wise. Export the mailbox to MBOX or run a Time Machine backup before you start, so the original mail stays safe.
So where are you pulling the addresses from?
Pulling addresses out of Apple Mail is free, because the mail is plain text. Previous Recipients hands you the people you’ve written to in a click, and a one-line Terminal grep pulls every address from an exported mailbox and dedups it. A tool does the same on Windows. Remember to keep it to your own contacts. So where are you pulling the addresses from, the built-in list, or the entire mailbox?