Nowadays, we send emails almost everyday. They have become one of the most convenient ways to communicate with colleagues, friends and family living far away. If you’d like to explore how the email is structured, read this article and find out what the body of an email entails and how many headers can it have among other details.
Email Structure: Headers and Body
An email has two basic parts: header and body. The first one, the header, is a set of lines containing information about the message's transportation, such as the sender's address, the recipient's address, or timestamps showing when the message was sent by intermediary servers to the transport agents (MTAs), which act as a mail sorting office.
The header begins with the From line and is changed each time it passes through an intermediary server. Using headers, you can see the exact path taken by the email and how long it took each server to process.
An email includes at least the three following headers: From
, showing the sender's email address; To
, showing the recipient's email address; and Date
, showing the date when the email was sent.
It may contain the following optional fields: Received
, showing various information about the intermediary servers and the date when the message was processed; Reply-To
, showing a reply address; Subject
showing the message's subject; message-ID
, showing a unique identification for the email message.
The part of the email called Body
contains the message, separated from the header by a line break.
An email is made up of lines of displayable 7-bit US-ASCII characters. Each line has, at most, 76 characters for compatibility reasons and ends with the characters CRLF (\r\n).
It is important to note that header data is no guarantee of when the message was sent or who sent it. Additional personalized headers (called X-headers
) can be set in order to provide the appropriate information. X-headers are called such because their name must begin with X-
For example, some anti-spam software programs mark messages as unwanted using the following header: