Multipart email with HTML body and attachment
An email message with a plain-text part, an HTML alternative, a base64-encoded CSV attachment and an encoded-word subject line.
Download
sample-multipart-attachment.eml
1.23 KB1,264 bytes
Download EML sampleDirect download. No sign-up and no waiting.
- Type
- message/rfc822
- SHA-256
ade88fdb125d3c3c9eb6e99edc668bedbe19c944f3b20f71596915bba8cffd8f- Direct URL
https://sampletestfiles.com/downloads/samples/sample-multipart-attachment.eml
Why test with this file
Covers the MIME features that email parsers most often get wrong.
| Structure | multipart/mixed containing multipart/alternative |
|---|---|
| Parts | text/plain, text/html, text/csv attachment |
| Encodings | quoted-printable, 7bit, base64 |
| Line endings | CRLF |
What to check
After your application has processed sample-multipart-attachment.eml, confirm that:
- The subject is decoded from its encoded-word form, including the check mark.
- The HTML and plain-text bodies are both found, and the HTML is sanitised before display.
- The CSV attachment is extracted with the name contacts.csv and three lines of content.
How the file begins
The opening lines of sample-multipart-attachment.eml, exactly as they appear in the file.
From: "SampleTestFiles Samples" <samples@example.com>
To: "Test Recipient" <recipient@example.org>
Cc: "Second Recipient" <second@example.net>
Subject: =?UTF-8?Q?Sample_multipart_message_=E2=9C=93?=
Date: Thu, 01 Jan 2026 09:00:00 +0000
Message-ID: <sample-multipart@example.com>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="fixture-mixed-001"
This is a multi-part message in MIME format.
--fixture-mixed-001
Content-Type: multipart/alternative; boundary="fixture-alt-001"
--fixture-alt-001Preview
Shows the file contents.
Technical details
| File name | sample-multipart-attachment.eml |
|---|---|
| Format | EML (Email message) |
| Extension | .eml |
| MIME type | message/rfc822 |
| Size | 1,264 bytes (1.23 KB) |
| Kind | Text |
| SHA-256 | ade88fdb125d3c3c9eb6e99edc668bedbe19c944f3b20f71596915bba8cffd8f |
| Created | 2026-10-10 |
| Validation | Exact size, signature bytes and structure checked when the file was generated |
| Preview | Available on this page |
| Source | Generated for this site; not copied from elsewhere |
| Licence | Free to use, modify and redistribute (terms) |
| Category | Email & Calendar |
Validated for expected format and integrity. As with any download, scan the file with your own security tools before opening it. How files are made and checked
Download from the command line and verify
Fetch the file with curl, then compare its checksum with the SHA-256 value above.
curl -o sample-multipart-attachment.eml 'https://sampletestfiles.com/downloads/samples/sample-multipart-attachment.eml'
sha256sum sample-multipart-attachment.eml # Linux
shasum -a 256 sample-multipart-attachment.eml # macOSOn Windows, run Get-FileHash sample-multipart-attachment.eml -Algorithm SHA256 in PowerShell. A matching value proves that the download is complete and unaltered.
Where it fits
- File parser testing
Well-formed files and deliberate edge cases for testing code that reads CSV, JSON, XML, PDF and more.
- API testing
Payloads and attachments for testing REST endpoints that receive, return or transform files.