email: Multipart content type
RFC 2046 provides a specification for multipart content types.
- Use
Content-type: multipart/...; boundary=aBoundaryValue
- Start each part with:
--aBoundaryValue
, that part's headers including the content type and a blank line. - End the final part with:
--aBoundaryValue--
Notes
- The final
<CR><LF>
before each boundary line is considered part of the boundary line. - For each message, choose a boundary identifier that does not appear in ANY of the parts.
Example
Content-type: multipart/text; boundary=AbCdE
--AbCdE
Content-type: text/plain
This is the first part (no trailing new line)
--AbCdE
Content-type: text/plain
This part has a single trailing new line
--AbCdE
Content-type: text/plain
This is the final part. It has a distinguished boundary line.
--AbCdE--
Published on: 11 Jul 2022