Skip to main content

What is the “boundary” parameter in MIME?

A boundary is a marker string used to separate different sections within a MIME email, such as text and attachments. It’s declared inside the Content-Type header.

The boundary string must be unique and should not appear anywhere in the message content. For example, a boundary might look like `----=NextPart_001_123ABC_456`, ensuring the email client knows exactly where each part begins and ends.

Picture a ship with separate cargo holds labeled with ropes and dividers—each section starts and ends with its boundary line, ensuring nothing mixes during the voyage.