Email Tutorials - Herong's Tutorial Examples - v1.04, by Herong Yang
Content-Type: multipart/mixed; boundary="..."
This section provides an email message example with 'Content-Type: multipart/mixed; ...' header to indicate that the content contains multiple parts. This is commonly used to send emails with attachments.
What Is 'Content-Type: multipart/mixed; boundary="..."' Email Header? "Content-Type: multipart/mixed" specifies that the email message content contains multiple parts separated by the given boundary line.
The most common use case of the "Content-Type: multipart/mixed" header is for sending emails with attachments. Here is an example:
Return-Path: <herong@herongyang.com> Delivered-To: herong@herongyang.com Received: from 127.0.0.1 (localhost [127.0.0.1]) by mail.herongyang.com (Postfix) with ESMTP id 5EABD266002B for <herong>; 15 Nov 2023 06:19:34 -0500 (EST) Message-Id: <20231113111946.5EABD266002B@mail.herongyang.com> Date: 15 Nov 2023 06:19:34 -0500 (EST) From: herong@herongyang.com Content-Type: multipart/mixed; boundary="___S7sFgzbbueqa___" This is a multi-part message in MIME format. --___S7sFgzbbueqa___ Joe, Attached is my virtual contact file. -- Herong --___S7sFgzbbueqa___ Content-Type: text/x-vcard Content-Disposition: attachment; filename="herong.vcf" BEGIN:VCARD VERSION:4.0 FN:Herong Yang EMAIL:herong_yang@yahoo.com END:VCARD --___S7sFgzbbueqa___--
Note that the second part in the above email message uses the 'Content-Disposition: attachment; filename="herong.vcf"' header to indicate that this part should be treated as an attachment file.
Table of Contents
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