## CamelMultipart CamelMultipart |

## Synopsis

    struct              CamelMultipart;
    CamelMultipart *    camel_multipart_new                 (void);
    void                camel_multipart_add_part            (CamelMultipart *multipart,
                                                             CamelMimePart *part);
    CamelMimePart *     camel_multipart_get_part            (CamelMultipart *multipart,
                                                             guint index);
    guint               camel_multipart_get_number          (CamelMultipart *multipart);
    const gchar *       camel_multipart_get_boundary        (CamelMultipart *multipart);
    void                camel_multipart_set_boundary        (CamelMultipart *multipart,
                                                             const gchar *boundary);
    const gchar *       camel_multipart_get_preface         (CamelMultipart *multipart);
    void                camel_multipart_set_preface         (CamelMultipart *multipart,
                                                             const gchar *preface);
    const gchar *       camel_multipart_get_postface        (CamelMultipart *multipart);
    void                camel_multipart_set_postface        (CamelMultipart *multipart,
                                                             const gchar *postface);
    gint                camel_multipart_construct_from_parser
                                                            (CamelMultipart *multipart,
                                                             CamelMimeParser *parser);

## Object Hierarchy

      GObject
       +----CamelDataWrapper
             +----CamelMultipart
                   +----CamelMultipartEncrypted
                   +----CamelMultipartSigned

## Description

## Details

### struct CamelMultipart

    struct CamelMultipart;

### camel_multipart_new ()

    CamelMultipart *    camel_multipart_new                 (void);

Create a new CamelMultipart object.

Returns : | a new CamelMultipart object

### camel_multipart_add_part ()

    void                camel_multipart_add_part            (CamelMultipart *multipart,
                                                             CamelMimePart *part);

Appends the part to the multipart object.

`multipart` : | a CamelMultipart object
`part` : | a CamelMimePart to add

### camel_multipart_get_part ()

    CamelMimePart *     camel_multipart_get_part            (CamelMultipart *multipart,
                                                             guint index);

`multipart` : | a CamelMultipart object
`index` : | a zero-based index indicating the part to get
Returns : | the indicated subpart, or `NULL`

### camel_multipart_get_number ()

    guint               camel_multipart_get_number          (CamelMultipart *multipart);

`multipart` : | a CamelMultipart object
Returns : | the number of subparts in `multipart`

### camel_multipart_get_boundary ()

    const gchar *       camel_multipart_get_boundary        (CamelMultipart *multipart);

`multipart` : | a CamelMultipart object
Returns : | the boundary

### camel_multipart_set_boundary ()

    void                camel_multipart_set_boundary        (CamelMultipart *multipart,
                                                             const gchar *boundary);

Sets the message boundary for `multipart` to `boundary`. This should be a string which does not occur anywhere in any of `multipart`'s subparts. If `boundary` is `NULL`, a randomly-generated boundary will be used.

`multipart` : | a CamelMultipart object
`boundary` : | the message boundary, or `NULL`

### camel_multipart_get_preface ()

    const gchar *       camel_multipart_get_preface         (CamelMultipart *multipart);

Returns the preface text for `multipart`.

`multipart` : | a CamelMultipart
Returns : | the preface text

Since 3.12

### camel_multipart_set_preface ()

    void                camel_multipart_set_preface         (CamelMultipart *multipart,
                                                             const gchar *preface);

Set the preface text for this multipart. Will be written out infront of the multipart. This text should only include US-ASCII strings, and be relatively short, and will be ignored by any MIME mail client.

`multipart` : | a CamelMultipart object
`preface` : | the multipart preface

### camel_multipart_get_postface ()

    const gchar *       camel_multipart_get_postface        (CamelMultipart *multipart);

Returns the postface text for `multipart`.

`multipart` : | a CamelMultipart
Returns : | the postface text

Since 3.12

### camel_multipart_set_postface ()

    void                camel_multipart_set_postface        (CamelMultipart *multipart,
                                                             const gchar *postface);

Set the postface text for this multipart. Will be written out after the last boundary of the multipart, and ignored by any MIME mail client.

Generally postface texts should not be sent with multipart messages.

`multipart` : | a CamelMultipart object
`postface` : | multipat postface

### camel_multipart_construct_from_parser ()

    gint                camel_multipart_construct_from_parser
                                                            (CamelMultipart *multipart,
                                                             CamelMimeParser *parser);

Construct a multipart from a parser.

`multipart` : | a CamelMultipart object
`parser` : | a CamelMimeParser object
Returns : | `0` on success or `-1` on fail