Extract Email Addresses from EML Files

Extract email addresses from EML files. Notepad, a Python script and a Windows tool with real steps.

By · Published 23 Oct 2024 · Updated 13 Oct 2026 · 7 min read

Complete Guide to Extract Email Addresses from EML Files

Quick answer

EML files store every message as plain text, so addresses sit in header lines and body text with no button to collect them. Copying email addresses from EML files by hand takes hours for hundreds of files and misses addresses inside attachments. Below are three ways to extract email addresses from EML files, with real steps, a working script and fixes for missing addresses.

Where do EML files store email addresses?

EML files keep addresses in three places. Header lines at top of a file hold From, To, Cc, Bcc and Reply-To addresses. Message body text can hold more, such as signatures and forwarded replies. Attachments such as PDF and Word files can carry addresses too. To extract email addresses from EML files in full, a method must read all three places.

Header lines are easy to read because EML is plain text. Body text and attachments are harder, since attachments sit inside a file as encoded text. That gap decides which way to extract email addresses from EML files fits your job.

How to extract email addresses from EML files manually?

Open EML files in Notepad and copy addresses from header lines. Manual copying of EML email addresses works for a few files and fails at scale, since you repeat steps for every message.

  1. Right-click an EML file, select Open with and then Notepad.
  2. Find lines that start with From:, To: and Cc: near top of file.
  3. Copy email addresses from those EML header lines. A display name sits in quotes and a real address sits between < and > symbols.
  4. Press Ctrl+F and search for @ to spot addresses in body text.
  5. Paste addresses into a text file, one per line, then repeat for your next EML file.
  6. Open your list in Excel and select Data, then Remove Duplicates.

Notepad shows raw text, so long header lines wrap and encoded subjects look messy. Attachment addresses stay hidden unless you open every attachment separately. To read EML files in a browser instead, see how to open EML files in Google Chrome.

How to extract email addresses from EML files with Python?

A short Python script extracts email addresses from EML files in a folder at once. It uses Python's built-in email package, so you install nothing extra. It reads From, To, Cc, Bcc and Reply-To headers, lowercases addresses and drops duplicates.

  1. Install Python 3 on your PC and save script below as extract_eml.py.
  2. Open Command Prompt in your script folder.
  3. Type python extract_eml.py C:\Mails addresses.txt, replacing C:\Mails with your EML folder.
  4. Open addresses.txt and check your list.
import sys, glob, os
from email import policy
from email.parser import BytesParser
from email.utils import getaddresses

folder, outfile = sys.argv[1], sys.argv[2]
found = set()
for path in glob.glob(os.path.join(folder, "**", "*.eml"), recursive=True):
    with open(path, "rb") as f:
        msg = BytesParser(policy=policy.default).parse(f)
    for field in ("From", "To", "Cc", "Bcc", "Reply-To"):
        for name, addr in getaddresses(msg.get_all(field, [])):
            if addr:
                found.add(addr.lower())
with open(outfile, "w") as out:
    out.write("\n".join(sorted(found)))
print(len(found), "addresses saved to", outfile)

That script searches subfolders and handles names with commas, such as "Carl, D" <carl@example.net>. It does not read body text or attachments, so addresses inside them stay behind. It also cannot filter by date or sender. Read Python's email package documentation to extend it.

Bulk method with free demo

How to extract EML email addresses in bulk with software?

Use Corbett Email Address Extractor to extract email addresses from EML files without scripts. Its page says it searches From, To, Cc, Subject, Message Body and Message Header fields, reads PDF and Word attachments, shows a total count and saves a TXT list. Free demo works on 10 items.

Download Now Purchase Now

Steps to extract email addresses from EML files with software

  1. Install Corbett Email Address Extractor on your Windows PC and start setup with Run as Administrator.
  2. Select Open, then Email Data Files and EML Files.
  3. Choose EML files or folders from your PC and load them for email address extraction.
  4. Preview your messages. Untick folders you do not need.
  5. Select Extract at top of window, then Email Addresses.
  6. Tick fields that should supply addresses: From, To, Cc, Subject, Message Body, Message Header or attachments.
  7. Add date, sender or file type filters if you need a shorter list.
  8. Browse to a destination folder and select Extract. Your addresses land in a TXT file that opens in Notepad.

Check your count of EML email addresses in results pane before you save, test on a small folder and then buy. Lifetime licence starts at $99 with a 30-day money-back window. Software loads EML and EMLX files and works on Windows 10 and older editions with 100 MB of free disk space. To pull addresses from other formats, read how to extract email addresses from MBOX files and how to extract email addresses from Maildir.

Which way to extract email addresses from EML files is best?

Use Notepad for three or four files and Python for header addresses in a folder. Use software to extract email addresses from EML files when addresses hide in body text or attachments, or when you need filters.

Way to extract EML email addressesCostReads body and attachmentsFiltersBest for
Notepad and copyFreeBody by search, attachments by handNoneA few files
Python scriptFreeNoNoneHeader addresses in one folder
Corbett Email Address ExtractorFree demo, then from $99YesDate, sender, receiver, subject, file typeBig batches

Why are email addresses missing after extraction?

Missing addresses come from four causes when you extract email addresses from EML files. A script that reads headers only skips addresses in body text and attachments. Filters narrow your list, so clear date and sender filters before you extract. Unticked folders stay out of your results. Duplicates collapse into one line, so your count looks lower than your message count.

Check fields first, then folders, then filters when EML email addresses go missing. Other formats follow a similar pattern. See how to extract email addresses from Thunderbird and how to extract email addresses from an OLM file.

Where do you get EML files?

Gmail's Download message option saves one message as an EML file, and Thunderbird saves messages as EML files with Save As. Many mail tools and archives export EML too. To keep EML copies in a mailbox, read how to import EML to Gmail. To save them as documents, see how to convert EML to PDF or print EML files. To pull files out of messages, read how to extract attachments from EML files.

Key takeaways

Questions about extracting email addresses from EML files

How do I extract email addresses from EML files?

Open EML files in Notepad and copy header addresses, execute a Python script on a folder or load files in software that saves a TXT list in bulk.

Where are email addresses stored in EML files?

In header lines such as From, To and Cc, in message body text and inside attachments.

Can I extract email addresses from EML files for free?

Yes. Notepad and a Python script extract email addresses from EML files free. Software adds body, attachment and filter support.

Does Python read addresses in message body text?

Not in script above. It reads header fields only. You need extra code or software for body text.

Can software extract addresses from EML attachments?

Yes. Corbett's page says its attachment option reads PDF, Word and other files and stores addresses in a TXT file.

Can I extract addresses from one sender only?

Yes. Software filters by From, To, Cc, Subject, Message Body or Message Header. A tick box beside every field turns on selective retrieval.

Does software read EMLX files too?

Yes. Corbett's page lists EML and EMLX among supported files, plus PST, MBOX, MSG and Maildir.

How many addresses does free demo extract?

Free demo works on 10 items. Full edition lifts that cap.

What file type holds my extracted list?

A TXT file. It opens in Notepad or Notepad++ and pastes into Excel.

Which Windows versions does software need?

Corbett's page lists Windows 10 in 32-bit or 64-bit plus older editions. There is no Mac or Linux build.

Free demo

Need to Extract Email Addresses from EML Files?

Try Corbett Email Address Extractor to extract email addresses from EML files, starting with a small folder. Free demo works on 10 items, then purchase when your list looks right.

Download Now Purchase Now

Jared Young

Jared is an engineering graduate in Computer Science who specializes in data recovery and backup. He writes Corbett Software guides on email attachments, backups and mail migration.