Sample EML emails
Two email messages saved as .eml files, written with Python's email library: a multipart message with a plain-text body, an HTML alternative and a CSV attachment of 100 fictional sales orders, and a simple plain-text message. Free, no sign-up. Updated 28 November 2026.
What these files are
Two email messages saved as .eml files, written with Python's email library: a multipart message with a plain-text body, an HTML alternative and a CSV attachment of 100 fictional sales orders, and a simple plain-text message. All addresses use the reserved example.com domain.
Every file was generated by our own code, so nothing in them is copied from anyone, and we release them under CC0: use them for anything. The facts in the table were read back from each file after it was written, not typed in by hand.
About the format
An .eml file is one email in the Internet Message Format (RFC 5322): header lines such as From, To, Subject and Date, a blank line, then the body. MIME (RFC 2045 to 2049) adds content types and multipart bodies: a multipart/mixed message is split by a boundary string into parts, a multipart/alternative part offers the same text as plain text and HTML, and attachments are usually base64-encoded with a Content-Disposition header that names the file.
These files open in Outlook, Apple Mail, Thunderbird and any text editor. A web server should send them with the header Content-Type: message/rfc822; related extensions: .msg is Outlook's different, binary format.
2 files to download
| File | Size | What it is |
|---|---|---|
| sample-email-with-attachment.eml | 23 KB | multipart MIME email: plain text + HTML alternative + a CSV attachment (100 rows) content type: multipart/mixed; parts: 5; attachments: sales-orders-100.csv; subject: Sample email: order SO-100001 with a CSV attachment |
| sample-plain-text.eml | 667 B | single-part plain-text email, no attachment content type: text/plain; parts: 1; attachments: none; subject: Sample plain-text email |
MIME type: message/rfc822. Total 24 KB.
Good for testing
- Email parsers and inbound-mail webhooks
- Attachment extraction
- Mail clients' import and preview
- Spam and security scanners in a test environment
Check a file
python -c "import email; m = email.message_from_bytes(open('sample-email-with-attachment.eml','rb').read()); print([p.get_content_type() for p in m.walk()])"Compare the SHA-256 checksum to make sure the download is complete and unchanged (sha256sum file on Linux, shasum -a 256 file on macOS, certutil -hashfile file SHA256 on Windows):
| File | SHA-256 |
|---|---|
| sample-email-with-attachment.eml | acca4004ab45339c73286d3dea6fd365752487ac0374b8a082c45a033ebe9bfe |
| sample-plain-text.eml | 38ab35808c8a1d8c749a6d63db4eab66bdcb1bc7f0e9b4473b6efa4db445c129 |