---
obj: format
mime: "message/rfc822"
extension: "eml"
rfc: https://datatracker.ietf.org/doc/html/rfc822
aliases: ["eml"]
---

# Electronic Mail File
An EML (Electronic Mail) file is a standard file format used to store [email](../internet/eMail.md) messages. It's a plain text file that follows specific conventions to encapsulate the content, metadata, and attachments of an [email](../internet/eMail.md) message.

## Structure
**Header Section**: The header section contains metadata about the [email](../internet/eMail.md) message, such as:
- `From`: The sender's [email](../internet/eMail.md) address.
- `To`: The recipient(s) [email](../internet/eMail.md) address(es).
- `Subject`: The subject of the [email](../internet/eMail.md).
- `Date`: The date and time when the [email](../internet/eMail.md) was sent.
- `CC` (Carbon Copy): Additional recipients who receive a copy of the [email](../internet/eMail.md).
- `BCC` (Blind Carbon Copy): Additional recipients who receive a copy of the [email](../internet/eMail.md) without other recipients being aware of it.
- `Message-ID`: A unique identifier for the message.
- `MIME-Version`: The [MIME](MIME.md) (Multipurpose Internet Mail Extensions) version used for the message.
- `Content-Type`: The type of content in the message (e.g., `text/plain` for plain text, `text/html` for [HTML](../internet/HTML.md) content).
- `Content-Transfer-Encoding`: The encoding method used for the message body.
- Other optional header fields.

**Blank Line**: After the header section, there is usually a blank line that separates the header from the body of the [email](../internet/eMail.md).

**Body Section**: The body section contains the main content of the [email](../internet/eMail.md) message. This can be plain text, [HTML](../internet/HTML.md), or a combination of both, depending on the Content-Type specified in the header. If the Content-Type is `text/plain`, the body will be plain text. If the Content-Type is `text/html`, the body will contain [HTML](../internet/HTML.md)-formatted content.

**Attachments (Optional)**: If the [email](../internet/eMail.md) message contains attachments, they are typically encoded and included in the EML file after the body section. Attachments can be of various types, such as images, documents, or multimedia files. The attachments are usually encoded using [MIME](MIME.md) encoding techniques like [Base64](Base64.md).

**Boundary Delimiters**: If there are multiple parts in the message (such as text and [HTML](../internet/HTML.md) versions), or if there are attachments, boundary delimiters are used to separate these parts. These delimiters are specified in the Content-Type header field.

## Example
```eml
From: D-O-double-G <dogg@snoop.com>
To: My Homie <homie@x.com>
Subject: Let's Roll, Dawg!

Yo,

I've been sniffin' around and heard 'bout this chill spot where dogs can kick it. How 'bout we roll there together?

Hit me up if you're down,
D-O-double-G 🐾
```