Free EML sample files
A single email saved as text: headers, a blank line, then the body. Download valid EML test files in 4 exact sizes, from 1 KB to 1 MB, each with a checksum.
- Extension
- .eml
- MIME type
- message/rfc822
- Kind
- Text
- Category
- Email & Calendar
EML files by size
Every file below is a valid Email message file of exactly the stated size. Open a file's page for its checksum and contents, and to preview it in your browser before downloading.
| File | Size | Contents | Download |
|---|---|---|---|
| 1 KB EML samplesample-eml-1kb.eml | 1 KB1,024 bytes | Body paragraphs: 2 | Download EML |
| 10 KB EML samplesample-eml-10kb.eml | 10 KB10,240 bytes | Body paragraphs: 29 | Download EML |
| 100 KB EML samplesample-eml-100kb.eml | 100 KB102,400 bytes | Body paragraphs: 306 | Download EML |
| 1 MB EML samplesample-eml-1mb.eml | 1 MB1,048,576 bytes | Body paragraphs: 3,149 | Download EML |
More EML samples
Hand-designed files with realistic content or a specific edge case.
| File | Size | Contents | Download |
|---|---|---|---|
| Multipart email with HTML body and attachmentsample-multipart-attachment.eml | 1.23 KB1,264 bytes | multipart/mixed containing multipart/alternative | Download EML |
What is an EML file?
An .eml file contains one email message exactly as it travels between mail servers. A block of headers such as From, To, Subject and Date is followed by a blank line and the body.
Messages with formatting or attachments use MIME, which splits the body into parts separated by boundary lines and encodes binary content as base64.
How to recognise an EML file
No signature bytes. EML files are identified by parsing their content.
| Extension | .eml |
|---|---|
| MIME type | message/rfc822 |
| Standards | RFC 5322 and MIME (RFC 2045 to 2049) |
| Line endings | CRLF |
| Line length | 78 characters recommended, 998 maximum |
| Attachments | MIME parts, usually base64 |
What to test for
These are the behaviours that most often go wrong when software handles EML files.
- Header values can be folded across lines and encoded with RFC 2047 encoded-words; parsers that read headers line by line get subjects wrong.
- An HTML body is untrusted HTML and needs sanitising before display.
Strengths of EML
- An exact copy of the message as it was transmitted, headers included.
- Opens in every desktop mail client.
Limitations of EML
- The nested MIME structure is intricate to parse correctly.
- One message per file, so mailboxes need another format.
Typical uses of EML test files
- Testing email parsers and import features
- Checking attachment extraction
- Testing help-desk and archiving software
Software that opens EML
- Outlook, Apple Mail and Thunderbird
- Python email package, MailKit and mailparser
- Email testing tools
Specifications
Related
EML sample files: questions
- Are the email addresses real?
- No. They use example.com and example.org, which are reserved for documentation and cannot receive mail.
- What is the MIME type of an EML file?
- The MIME type is message/rfc822. The file extension is .eml.
- Is a sample EML file the same as a dummy or example EML file?
- Yes. Sample, test, dummy and example EML files are different names for the same thing: an EML file with known contents that stands in for a real one. Any file on this page will do wherever a tutorial or a test plan asks for a dummy EML file.