Skip to content
Novus Examples
eml1.2 KB

EML — Identical Image, Inline and Attached

The same 16x16 PNG appears twice with the same filename: once inline with a Content-ID, once as a plain attachment. Deduplicating by filename or by content hash collapses the pair and loses one of them, which is how an attachment silently disappears.

Preview — first 32 lineseml
From: Maya Chen <maya@brightside.example>
To: Sam Rivera <sam@meridiansupply.example>
Subject: One image, both dispositions
Date: Fri, 13 Feb 2026 11:00:00 -0800
Message-ID: <p7-disp-both@brightside.example>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=_p7_disp_both"

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

<html><body><p>The badge below is inline; the identical file is also attach=
ed.</p><img src=3D"cid:badge4.p7@brightside.example" width=3D"16" height=3D=
"16" alt=3D"badge"></body></html>
--=_p7_disp_both
Content-Type: image/png; name="badge.png"
Content-Transfer-Encoding: base64
Content-ID: <badge4.p7@brightside.example>
Content-Disposition: inline; filename="badge.png"

iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFklEQVR42mPgm5tNEmIY1TCqYfhq
AABu9xYQCHe7pQAAAABJRU5ErkJggg==
--=_p7_disp_both
Content-Type: image/png; name="badge.png"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="badge.png"

iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAFklEQVR42mPgm5tNEmIY1TCqYfhq
AABu9xYQCHe7pQAAAABJRU5ErkJggg==
--=_p7_disp_both--

Specifications

Wave
p7
Seed
20260807
Structure
multipart/mixed
Image Parts
2
Identical Bytes
true
Dispositions
inline (with Content-ID) + attachment
Png Bytes
79
Line Endings
CRLF (RFC 5322)

Testing contract

Expected to pass
Scenario
Enumerate attachments when byte-identical images appear under both inline and attachment dispositions.
Expected result
Exactly one attachment (badge.png) is offered for download and the inline copy renders in the body — neither part is dropped by hash-based deduplication.

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 — Identical Image, Inline and Attached” is a deterministic Novus Examples fixture for Email parsing, Conversion testing. 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) · multipart/mixed. 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("disposition-inline-and-attachment.eml", "rb"))
print(msg["subject"], msg["from"])

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