Whats an email anyway? What are it's components?

A some what weird question but when explored its very interesting and lets see how deep the rabbit hole goes!

Electronic mail is commonly called as e-mail or eMail, its been around from 1973. it’s a method of exchanging digital messages across the internet or other computer networks. After the Snowden era may be we will see a trend of peer to peer communication without a centralised server, the way it was in the beginning of time! 

An Internet email message contains 3 components:-

  • Message envelope
  • Message header – contains control information, flow and etc.
  • Message body
In a client-server model, client is from where the message originate and Email servers accept, forward, deliver and store messages. 

Originally emails could carry text-only (7-bit ASCII) communications medium, which was then extended to carry multi-media content attachments, a process standardised in RFC 2045 through 2049. Collectively, these RFCs have come to be called Multipurpose Internet Mail Extensions (MIME). The Internet email message format is now defined by RFC 5322, got from RFC 2822, 822.

Network-based email exchanged by the SMTP. In the process of transporting email messages between systems, SMTP communicates delivery parameters using a message envelope separate from the message (header and body) itself.

This standard specifies a syntax for text messages that are sent among computer users, within the framework of "electronic mail".

A message consists of header fields and, optionally, a body. The body is simply a sequence of lines containing ASCII characters. It is separated from the headers by a null line.

When we go to an email and analyse its header information, we see the following fields:-

TO:This field contains the identity of the primary recipients of the message.  
CC:This field contains the identity of the secondary (informational) recipients of the message.  
BCCThis field contains the identity of additional recipients of the message. The contents of this field are not included in copies of the message sent to the primary and secondary recipients. Gmail choose to include the text of the "Bcc" field only in receipent's copy due to which he got the mail.  
MESSAGE-ID / RESENT-MESSAGE-IDThis field contains a unique identifier (the local-part address unit) that refers to THIS version of THIS message. The host that generates it guarantees the uniqueness of the message identifier. This identifier is intended to be machine readable and not necessarily meaningful to humans. A message identifier pertains to exactly one instantiation of a particular message; subsequent revisions like replies or forwards to the essage should each receive new message identifiers 
IN-REPLY-TOThe contents of this field identify previous correspondence, which this message answers. Note that if message identifiers are used in this field, they must use the msg-id specification format.A message just sent will not have a IN-REPLY-TO field. 

REFERENCESThe contents of this field identify other correspondence which this message references. Note that if message identifiers are used, they must use the msg-id specification format. i.e. this will have all the Message IDs so far. 
SUBJECTThis is intended to provide a summary, or indicate the nature, of the message. 

See below the Screenshot of the mail threads.

 Some more fields in the mail but not used.
ENCRYPTEDSometimes, data encryption is used to increase the privacy of message contents. If the body of a message has been encrypted, to keep its contents private, the "Encrypted" field can be used to note the fact and to indicate the nature of the encryption. Not applicable when it comes to gmail. 

EXTENSION-FIELDA limited number of common fields have been defined in this document. As network mail requirements dictate, additional fields may be standardized. To provide user-defined fields with a measure of safety, in name selection, such extension-fields will never have names that begin with the string "X-". 

USER-DEFINED-FIELDIndividual users of network mail are free to define and use additional heade fields. Such fields must have names which are not already used in the current specification or in any definitions of extension-fields, and the overall syntax ofthese user-defined-fields must conform to this specification's rules for delimiting and folding fields. Due to the extension-field publishing process, the name of a user- defined-field may be pre-empted Note: The prefatory string "X-" will never be used in the names of Extension-fields. This provides user-defined fields with a protected set of names.