The service chain

A message user agent composes and displays mail. Submission introduces new messages, transfer agents relay them, and recipient-side tools access delivered messages; these roles can reside in different programs and organizations.

The arrangement allows sender and recipient to be online at different times. Mailboxes can represent individuals, organizations, lists or automated agents, so address syntax alone does not verify authorship.

References: [1]

Fields and body

Internet Message Format separates a field section from an optional body with an empty line. Fields such as From, To and Subject inform readers and software but differ from transport-envelope paths.

Message identifiers and reply fields help clients organize conversations. A displayed thread is not one continuous network connection: messages can be stored and processed again.

References: [1] [2]

Attachments and encodings

MIME adds media types, character-set information and transfer encodings so bodies can represent more than one kind of text. Clients use content types to decide how to process or display data.

An encoding such as Base64 solves representation, not secrecy. Reliable attachments, authorized authorship and encryption require separate checks; conformance to message format establishes none of them.

A multipart body separates text, attachments or other content into parts with their own fields and bodies, using delimiter lines specified by the Content-Type boundary parameter. Parsing follows that structure rather than splitting at an attachment filename; individual parts can carry their own media types and transfer encodings. RFC 2045 restricts transfer encoding of a multipart entity as a whole, so blindly Base64-wrapping the entire nested structure is not equivalent to encoding its individual contents.

References: [3] [4] [5]