.eml

EML test files

Complete MIME email messages for testing mail parsers, archivers and e-discovery tools, with attachments and the encodings that trip them.

Or start from a preset

What is a EML file?

Short answer

An EML file is one email message as plain text in the RFC 5322 format: header lines like From, To, Subject and Date, a blank line, then the body. MIME adds multipart bodies, attachments and encodings like base64 and quoted-printable.

Mail parsers have to decode RFC 2047 encoded words in headers, RFC 2231 file names, nested multipart structures and inline images referenced by Content-ID. The tests read every generated message with Python's email parser and check it has no defects.

Anatomy of a EML file

  • From / To / SubjectHeaders, folded at 78 characters
  • =?UTF-8?B?…?=RFC 2047 encoded word for non-ASCII text
  • multipart/mixedBody plus attachments
  • multipart/alternativePlain text and HTML versions
  • multipart/relatedHTML with inline images (cid:)
  • Content-Transfer-Encodingquoted-printable, base64 or 8bit

What you can generate

  • 0 to 20 attachments: txt, csv, png, pdf, json, up to about 2 MB each
  • Plain, HTML or both, as quoted-printable, base64 or raw 8bit
  • Non-ASCII subject and sender name (RFC 2047)
  • Unicode attachment names (RFC 2231)
  • Inline image referenced by cid:
  • Reply thread headers and quoted history
  • 60 recipients in folded To and Cc headers

How to make one

  1. Open the EML generator, or start from a preset above.
  2. Set the size and switch on the edge cases you need; the preview and size estimate follow every change.
  3. Generate, then download. The file is made in your browser, and the same preset and seed always give you the same file.

Questions

Yes. Outlook, Apple Mail and Thunderbird open .eml files. Every address is on example.test, so nothing can be sent anywhere by accident.

Yes: the PNG, PDF, CSV, JSON and text attachments are generated by the same writers as the other formats and decode to valid files.

RFC 5322 recommends header lines of at most 78 characters; longer headers are folded onto continuation lines.

Related formats