Extract Email Addresses from EML Files

Pull 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

Extract email addresses from EML files in 3 ways. Use Notepad, a Python script or extractor software.

Notepad suits a handful of files. Script handles one folder of headers. Software scans headers and body text and attachments.

Test an EML email address extractor on ten files first.

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 pull addresses from EML files, with real steps, a working script and fixes for missing addresses.

Where do EML files store email addresses?

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

Header lines are easy to scan 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 pull addresses from EML files fits your task.

How to pull 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 remain hidden unless you open every attachment separately. To view 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 pulls addresses from a folder at once. It uses Python's built-in email package so you install nothing extra. It scans 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, like "Carl, D" <carl@example.net>. It does not scan body text or attachments so addresses inside them remain behind. It also cannot filter by date or sender. See 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 pull addresses from EML files without scripts. Its page says it searches From, To, Cc, Subject, Message Body and Message Header fields, scans 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 pull 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 open 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 go to 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 opens 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, see how to Extract email addresses from MBOX files and how to Extract email addresses from Maildir.

Which way to pull EML email addresses suits you?

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

Way to extract EML email addressesCostScans body and attachmentsFiltersSuits
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 pull addresses from EML files. A script that scans headers only ignores addresses in body text and attachments. Filters narrow your list so clear date and sender filters before you extract. Unticked folders remain 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 retain EML copies in a mailbox, see 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, see how to Extract attachments from EML files.

Key takeaways

Questions About EML Email Addresses

Where are email addresses stored in EML files?

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

Can software extract addresses from EML attachments?

Yes. Corbett's page says its attachment option scans 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 activates selective retrieval.

Does software open EMLX files too?

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

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 open files in software that saves a TXT list in bulk.

Can I pull EML email addresses for free?

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

What file type contain my extracted list?

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

Free demo

Need to Pull addresses from EML files?

Try Corbett Email Address Extractor to pull EML email addresses, 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 saves Corbett Software guides on email attachments, backups and mail migration.