.eml file

A file that stores one complete email, headers and body, as plain text in the standard internet message format.

In more detail

Saving a suspicious message as an .eml file keeps every header, which a mail program's normal view hides. The file can be opened in a text editor or parsed by a program. It is a common way to hand a phishing sample to a security team as evidence.

Example

with open("invoice.eml", "rb") as f:
    msg = BytesParser(policy=policy.default).parse(f)

Related terms

Taught in

References