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

This section provides an email message example with 'Content-Type: multipart/alternative; ...' header to specify that the content contains multiple alternative parts.

What Is 'Content-Type: multipart/alternative; boundary="..."' Email Header? "Content-Type: multipart/alternative" specifies that the email message content contains multiple parts separated by the given boundary line. Each part is considered as an alternative to the other parts. "multipart/alternative" allows the email client to present the most suitable alternative part to the email recipient.

The following email message contains a content of 2 alternative parts: one with the default of "Content-Type: text/plain". the other with "Content-Type: text/html".

Return-Path: <>
Received: from (localhost [])
  by (Postfix) with ESMTP id 5EABD266002B
  for <herong>; 15 Nov 2023 06:19:34 -0500 (EST)
Message-Id: <>
Date: 15 Nov 2023 06:19:34 -0500 (EST)
Content-Type: multipart/alternative; boundary="___S7sFgzbbueqa___"

This is a multi-part message in MIME format.

Chloe & Oliver


JULY 7, 2027
Content-Type: text/html

<p style="text-align: center">
<span style="font-family: 'Dancing Script'; font-size: 4em">Chloe
<span style="font-size: 0.5em">&</span> Oliver</span><br/>
<span style="font-family: sans-serif; font-size: 1em">
<span style="font-size: 2em">JULY 7, 2027</span></span>

If a text based email tool receives the above message, it will select the first part as the message content to display.

If a Web browser based email tool receives the above message, it will select the second part as the message content and render it as a nicely formatted page.

Note that the boundary string specified in the header is used to identify the beginning end ending of each part in the message content as described below:

Table of Contents

 About This Book

 Introduction to Email

 Postfix - Mail Transport Agent (MTA)

 SSL/TLS Secure Connections with Postfix Server

 Dovecot - IMAP and POP3 Server

 SSL/TLS Secure Connections with Dovecot Server

 Email Client Tools - Mail User Agents (MUA)

 Mozilla Thunderbird - Mail User Agents (MUA)

 PHPMailer - PHP Package for Sending Emails

Email Message Format and Headers

 Email Message Format and Example

 What Are Email Message Headers

 Content-Type: text/html - HTML Content

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

 Content-Type: multipart/mixed; boundary="..."

 Content-Transfer-Encoding: 8bit - Non-ASCII Content

 Content-Transfer-Encoding: base64 - Base64 Encoded Content

 Content-Transfer-Encoding: quoted-printable - 7-Bit Encoding

 Subject: =?...?= - 7-Bit Encoding

 From: ... - Email "From" Address

 To: ... - Email "To" Addresses

 Received: from ... by ... - SMTP Server Log


 Full Version in PDF/EPUB