2.9 KiB
obj | mime | extension | rfc | aliases | rev | |
---|---|---|---|---|---|---|
format | message/rfc822 | eml | https://datatracker.ietf.org/doc/html/rfc822 |
|
2024-03-02 |
Electronic Mail File
An EML (Electronic Mail) file is a standard file format used to store email messages. It's a plain text file that follows specific conventions to encapsulate the content, metadata, and attachments of an email message.
Structure
Header Section: The header section contains metadata about the email message, such as:
From
: The sender's email address.To
: The recipient(s) email address(es).Subject
: The subject of the email.Date
: The date and time when the email was sent.CC
(Carbon Copy): Additional recipients who receive a copy of the email.BCC
(Blind Carbon Copy): Additional recipients who receive a copy of the email without other recipients being aware of it.Message-ID
: A unique identifier for the message.MIME-Version
: The MIME (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 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.
Body Section: The body section contains the main content of the email message. This can be plain text, HTML, 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-formatted content.
Attachments (Optional): If the email 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 encoding techniques like Base64.
Boundary Delimiters: If there are multiple parts in the message (such as text and HTML 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
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 🐾