Brand Logo
  • Email Tools
      Smart Email Tools

      Extract, analyze and test your emails for content, authentication and deliverability.

      Extraction Tools
      • Extract HTML
      • Extract Text
      • Extract & Analyze Headers
      • Extract Attachments
      • Extract Links
      Analysis & Testing
      • SMTP Server Test
      • SpamAssassin Test
      • Email Authentication Check
      • Spam Words Checker
      • HTML Code Validator
      • Email Source Analyzer
      View All Email Tools
  • SuperTools
      Advanced DNS, Network & Security Tools

      Deep-dive into DNS, IP, TLS and security records for any domain or IP.

      DNS Records
      • DNS Lookup
      • AAAA Lookup
      • MX Lookup
      • NS Lookup
      • CNAME Lookup
      • TXT Lookup
      • SOA Lookup
      • SRV Lookup
      Email Auth
      • SPF Lookup
      • SPF Authorization
      • DKIM Lookup
      • DMARC Lookup
      • BIMI Lookup
      • MTA-STS Lookup
      Network Tools
      • Ping
      • Traceroute
      • HTTP Lookup
      • HTTPS Lookup
      • TCP Lookup
      • TLS Lookup
      Security & Cert
      • Certificate Chain
      • DNSKEY Lookup
      • DS Lookup
      • DNSSEC Lookup
      • RRSIG Lookup
      • NSEC3PARAM Lookup
      IP & Location
      • Reverse DNS
      • ARIN Lookup
      • ASN Lookup
      • LOC Lookup
      • IP2Location
      • What is My IP
      Domain Tools
      • Domain Health
      • WHOIS Lookup
      View All SuperTools
  • About Us
  • FAQs
  • Contact

How Are Multipart Emails Structured?

Understanding multipart email structure and MIME format

Table of Contents

  • How Multipart Emails Work
  • Multipart Structure
  • Multipart Types
  • MIME Boundaries
  • Email Client Handling

How Are Multipart Emails Structured?

Multipart emails are structured using MIME (Multipurpose Internet Mail Extensions) format with multiple parts separated by MIME boundaries. Structure includes: MIME headers (Content-Type: multipart/alternative, multipart/mixed, etc.), MIME boundaries (unique strings separating parts), multiple parts (HTML part, plain text part, attachment parts), and part headers (Content-Type, Content-Disposition, Content-Transfer-Encoding for each part).

Multipart/alternative contains HTML and plain text alternatives. Multipart/mixed contains text and attachments. Multipart/related contains HTML and inline images. Email clients parse MIME boundaries to identify and display appropriate parts.

Learn more about MIME in email and analyze email source code using our email source analyzer.

Multipart Structure

MIME Headers

Multipart emails start with MIME headers specifying multipart content type and boundary:

  • Content-Type: multipart/alternative; boundary="boundary-string"
  • Content-Type: multipart/mixed; boundary="boundary-string"

MIME Boundaries

MIME boundaries separate parts. Boundaries are unique strings that mark the start and end of each part.

Part Structure

Each part contains: part headers (Content-Type, Content-Disposition, Content-Transfer-Encoding), blank line, and part content.

Part Order

Parts are ordered by importance. Email clients typically display the first compatible part.

Multipart Types

Different multipart types serve different purposes:

multipart/alternative

Contains alternative versions of the same content (HTML and plain text). Email clients choose which version to display based on capabilities.

multipart/mixed

Contains mixed content (text and attachments). All parts are displayed together.

multipart/related

Contains related content (HTML and inline images). Parts are related and displayed together.

multipart/signed

Contains signed content (message and signature). Used for email authentication (DKIM).

Nested Multipart

Multipart emails can be nested (multipart/mixed containing multipart/alternative) for complex email structures.

MIME Boundaries

What Are Boundaries?

MIME boundaries are unique strings that separate different parts in multipart emails. Boundaries mark the start and end of each part.

Boundary Format

Boundaries are specified in Content-Type headers: Content-Type: multipart/alternative; boundary="unique-boundary-string"

Boundary Usage

Boundaries appear before each part (except the first): --boundary-string and after the last part: --boundary-string--

Boundary Parsing

Email clients parse MIME boundaries to identify and extract different parts for display.

Unique Boundaries

Boundaries must be unique within each email to ensure proper parsing.

Email Client Handling

Part Selection

Email clients select which part to display based on client capabilities and user preferences (HTML vs plain text).

Part Parsing

Clients parse MIME boundaries to identify and extract different parts for display.

Part Display

Clients display appropriate parts: HTML content for clients with HTML support, plain text for clients without HTML support.

Attachment Handling

Clients extract and display attachments from multipart/mixed messages separately.

Error Handling

Clients handle missing or invalid parts by displaying available parts or falling back to plain text.

Related Tools

Email Source Analyzer Extract Email HTML Extract Email Text Extract Email Attachments

Pages

  • About Us
  • Why Us
  • Contact
  • Privacy Policy
  • Terms & Conditions

Email Tools

Extraction Tools
  • Extract HTML
  • Extract Text
  • Extract & Analyze Headers
  • Extract Attachments
  • Extract Links
Analysis & Testing
  • SMTP Server Test
  • SpamAssassin Test
  • Email Authentication Check
  • Spam Words Checker
  • HTML Code Validator
View All Email Tools

SuperTools

  • DNS Lookup
  • MX Lookup
  • SPF Lookup
  • DMARC Lookup
  • DKIM Lookup
  • WHOIS Lookup
  • Ping
  • Traceroute
  • Domain Health Check
  • What is My IP
View All SuperTools

FAQ

  • What is Email Deliverability
  • Why Emails Go to Spam
  • How Spam Filters Work
  • What is SPF
  • What is DKIM
  • What is DMARC
  • How to Test SMTP Server
  • What are Email Headers
  • What is SpamAssassin
  • What is DNS
View All FAQs

Newsletter

Email: info@testmailscore.com
TestMailScore

© 2026 TestMailScore. All rights reserved.