Skip to content
Novus Examples
eml904 B

EML — Encoded-Words in Display Names and a Filename

Encoded-words used everywhere they turn up in practice: both display names, the Subject, and — against the spec but very common — inside the quoted filename parameter, where RFC 2231 is the conformant mechanism. A tolerant parser decodes all four.

Preview — first 22 lineseml
From: =?UTF-8?Q?Maya_Ch=C3=A9n?= <maya@brightside.example>
To: =?UTF-8?B?U8OhbSBSaXZlcmE=?= <sam@meridiansupply.example>
Subject: =?UTF-8?Q?Empfehlungsschreiben_f=C3=BCr_Ada_=28SAMPLE=29?=
Date: Mon, 09 Feb 2026 09:10:00 -0800
Message-ID: <p7-ew-names@brightside.example>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=_p7_ew_fn_01"

--=_p7_ew_fn_01
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Die Datei im Anhang tr=C3=A4gt einen kodierten Dateinamen (SAMPLE).
--=_p7_ew_fn_01
Content-Type: text/plain; charset="utf-8"; name="=?UTF-8?Q?Empfehlungsschreiben_f=C3=BCr_Ada.txt?="
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="=?UTF-8?Q?Empfehlungsschreiben_f=C3=BCr_Ada.txt?="

QWRhIExvdmVsYWNlIOKAlCBTQU1QTEUgRW1wZmVobHVuZ3NzY2hyZWliZW4uDQpBbmFseXRpY2Fs
IGVuZ2luZSwgMTg0My4NCg==
--=_p7_ew_fn_01--

Specifications

Wave
p7
Seed
20260807
Encoded In
From display-name, To display-name, Subject, filename
Filename Style
RFC 2047 inside a quoted-string (non-conformant but widespread)
Conformant Filename
false
Line Endings
CRLF (RFC 5322)

Testing contract

Expected to recover
Scenario
Decode encoded-words in address display names and in a Content-Disposition filename that uses RFC 2047 where RFC 2231 is required.
Expected result
Both display names and the Subject decode, and the attachment saves as Empfehlungsschreiben für Ada.txt rather than a literal =?UTF-8?Q?... string.

What is a .eml file?

An EML file is a single email message stored in the RFC 822 / MIME format — plain-text headers (From, To, Subject, Date, Message-ID) followed by the body, which may be plain text, HTML, or a multipart structure with alternative bodies and file attachments encoded in base64.

How to use this file

Use an example EML to test email header parsing, MIME decoding, HTML-part handling, attachment extraction, and EML-to-other-format conversion.

How to use this file for testing

“EML — Encoded-Words in Display Names and a Filename” is a deterministic Novus Examples fixture for Email parsing, Encoding detection, Internationalization. Standards-compliant RFC 822 messages — plain, multipart text+HTML, and with an attachment — plus an MBOX mailbox, for testing header parsing, MIME decoding, attachment extraction, and mailbox splitting.

Documented properties for this file: seed 20260807 · CRLF (RFC 5322). Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Email fixtures use fixed dates, message IDs, and MIME boundaries so runs are reproducible, and every address is fictional. Test header parsing, MIME decoding, attachment extraction, and EML/MBOX conversion against the documented structure.

Code examples

from email import policy
from email.parser import BytesParser

msg = BytesParser(policy=policy.default).parse(open("ew-display-name-and-filename.eml", "rb"))
print(msg["subject"], msg["from"])

Generated by generation/email_p7.py. Free for any use, no attribution required — license.