Constructing multipart MIME entities

std::vector<x::mime::encoder> sections;

x::headersimpl<x::headersbase::lf_endl> headers;

// ...
x::mime::encoder section=
    x::make_multipart_section(headers, "alternative",
                              sections.begin(), sections.end());

x::mime::make_multipart_section() contructs a multipart MIME section. x::mime::make_multipart_section supplies the Content-Type: multipart/subtype to the headers provided by its first parameter, with the second parameter specifying the subtype. The third and the fourth parameters are beginning and ending iterator over an input sequence of x::mime::encoders of MIME entities that make up the multipart entity.

The fifth, optional, parameter specifies the targeted line width of the constructed Content-Type header, and defaults to 76 characters. If the constructed header is projected to exceed this width (it usually is), it gets folded. Setting the fifth optional parameter to 0 disables folding, and the constructed header always consists of one line.