OpenPST

What lives inside an .eml

letter 01 · 12 jul 2026

Here's a small delight most people never discover: an .eml file opens in Notepad. Try it. Unlike nearly every modern file format, an email saved to disk is human-readable text, top to bottom — a design decision from the 1970s that has quietly survived half a century of committees. The reason your computer struggles to display one isn't obscurity; it's that the text follows rules, and the rules deserve a tour.

The headers: a form filled out by machines

The top of the file is name-and-value lines — From:, To:, Subject:, Date:, plus a dozen bureaucratic ones (Received: lines are the passport stamps of every server the message passed through, read bottom-up). Two quirks trip up naive readers. Long headers fold: a line starting with a space is a continuation of the previous one, a rule from when terminals were 80 characters wide. And anything non-English hides in encoded words — that =?utf-8?B?VHViZXMg4pyU?= gibberish is a subject line wearing a spacesuit, declaring its character set and encoding so it can cross servers that only trusted ASCII. Decoded, it might be Japanese, or an emoji, or your aunt's name with the accent intact.

The body: a tree with fences

A modern email is secretly several documents — a plain-text version, an HTML version, attachments — packed as multipart MIME. The header declares a boundary, an arbitrary string like --boundary42, and the body uses it as fencing between parts. Parts nest: a "mixed" container holds an "alternative" container (plain and HTML versions of the same words — your mail app picks one) plus the attachments. It's a file tree flattened into a letter, and once you see the fences you can read the whole structure with your eyes.

The cargo: binary taught to speak text

Email pipes were built for text, so binary attachments get re-spelled. Base64 turns every 3 bytes into 4 safe characters — that wall of JVBERi0xLjc... is a PDF speaking in tongues, 33% bigger for the trip. Text bodies with the occasional accent use quoted-printable instead, where =E2=80=94 is an em-dash in its travel clothes and a = at a line's end means "no break here, the pipe was just narrow". Both are perfectly reversible — decoding them is arithmetic, not magic.

Why this matters when you've got the file

Because the transparency is the guarantee. An .eml can't hide much: the sender's path, the true attachments, the tracking pixels in the HTML are all right there in text, examinable forever, no vendor required. It's the format your email actually is before an app dresses it up — which is why courts like it, archivists prefer it, and why the mailroom here could be built as a parser in a page. The letter was always readable. It just needed its rules followed — the folding unfolded, the fences walked, the cargo decoded — and every one of those rules is fifty years of boring, dependable, published standard.