Table of Contents

What is the message body of an email? (also known as Content)

About

The last part of the email message is called the body or the content of the message.

It is what the user will see.

Format

An email has a content part with a mime type (format) that is set with the content-type email header.

Example:

Content-Type: text/plain; charset=us-ascii
Content-Type: multipart/alternative; boundary="b1_QOvc4qkAfaq7Tgiq7M6THogyrrifARe0NIlLwqdmT4"

If the content mime type is a multipart type:

Multipart

Multipart. ie an email may be composed of several part where each part has another associated mime (format)

List:

Alternative

The format of advanced designed email is created in special email html document but plain text is always added in the message as a fallback because:

The content of the various parts is interchangeable. The client will show the LAST part if possible.

A body is then composed of a content that has the mime type multipart/alternative where:

See RFC2046 (Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types) for details of the structure of such a message.

Example: complex multipart alternative with:

The parts are delimited with a boundary and the base64 have been truncated but terminate with the classic ==

Content-Type: multipart/alternative; boundary="b1_QOvc4qkAfaq7Tgiq7M6THogyrrifARe0NIlLwqdmT4"

--b1_QOvc4qkAfaq7Tgiq7M6THogyrrifARe0NIlLwqdmT4
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: base64

SGVsbG8sCgpUaGlzIGlzIE1hcmssIE1lZGlhIFB1Ymxpc2hlciBvZiBUZWNoVGltZXMuY29tLiBb
VGVjaHRpbWVzLmNvbV0oaHR0cHM6Ly93d3cudGVjaHRpbWVzLmNvbS8pIHdpdGggNSBtaWxsaW9u
.................
.................
IERpZ2l0YWwgTWVkaWFdKGh0dHBzOi8vd3d3LnRlY2h0aW1lcy5jb20vKQ==
--b1_QOvc4qkAfaq7Tgiq7M6THogyrrifARe0NIlLwqdmT4
Content-Type: multipart/related; boundary="b2_QOvc4qkAfaq7Tgiq7M6THogyrrifARe0NIlLwqdmT4"; type="text/html"

--b2_QOvc4qkAfaq7Tgiq7M6THogyrrifARe0NIlLwqdmT4
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: base64

PGRpdiBzdHlsZT0iZm9udC1mYW1pbHk6IFZlcmRhbmEsIHNhbnMtc2VyaWY7IGZvbnQtc2l6ZTog
MTJweDsiPjxkaXY+PHNwYW4gc3R5bGU9ImZvbnQtZmFtaWx5OiBzeXN0ZW0tdWksIHNhbnMtc2Vy
aWY7IGZvbnQtc2l6ZTogMTRweDsgYmFja2dyb3VuZC1jb2xvcjogcmdiKDI1NSwgMjU1LCAyNTUp
.................
.................
bG9jay1lbXB0eSI+DQogICAgICAgIA0KICAgICAgICAgICAgPC9kaXY+DQo8L2Rpdj4NCg==
--b2_QOvc4qkAfaq7Tgiq7M6THogyrrifARe0NIlLwqdmT4
Content-Type: image/jpeg; name=image1697420268308
Content-Transfer-Encoding: base64
Content-ID: <[email protected]>
Content-Disposition: inline; filename=image1697420268308


--b2_QOvc4qkAfaq7Tgiq7M6THogyrrifARe0NIlLwqdmT4--
--b1_QOvc4qkAfaq7Tgiq7M6THogyrrifARe0NIlLwqdmT4--

Inline image

A part can be an inline image encoded in base64.

Example:

Content-Type: image/jpeg; name=image1697420268308
Content-Transfer-Encoding: base64
Content-ID: <[email protected]>
Content-Disposition: inline; filename=image1697420268308