Camel.Multipart

g Camel.DataWrapper Camel.DataWrapper Camel.Multipart Camel.Multipart Camel.DataWrapper->Camel.Multipart GObject.Object GObject.Object GObject.Object->Camel.DataWrapper

Subclasses:

Camel.MultipartEncrypted, Camel.MultipartSigned

Methods

Inherited:

Camel.DataWrapper (32), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

add_part (part)

construct_from_parser (parser)

get_boundary ()

get_number ()

get_part (index)

get_postface ()

get_preface ()

set_boundary (boundary)

set_postface (postface)

set_preface (preface)

Virtual Methods

Inherited:

Camel.DataWrapper (11), GObject.Object (7)

do_add_part (part)

do_construct_from_parser (parser)

do_get_boundary ()

do_get_number ()

do_get_part (index)

do_set_boundary (boundary)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

Camel.DataWrapper

r

Class Details

class Camel.Multipart(**kwargs)
Bases:

Camel.DataWrapper

Abstract:

No

Structure:

Camel.MultipartClass

classmethod new()
Returns:

a new Camel.Multipart object

Return type:

Camel.Multipart

Create a new Camel.Multipart object.

add_part(part)
Parameters:

part (Camel.MimePart) – a Camel.MimePart to add

Appends the Camel.part to the multipart object.

construct_from_parser(parser)
Parameters:

parser (Camel.MimeParser) – a Camel.MimeParser object

Returns:

0 on success or -1 on fail

Return type:

int

Construct a multipart from a parser.

get_boundary()
Returns:

the boundary

Return type:

str

get_number()
Returns:

the number of subparts in self

Return type:

int

get_part(index)
Parameters:

index (int) – a zero-based index indicating the Camel.part to get

Returns:

the indicated subpart, or None

Return type:

Camel.MimePart or None

get_postface()
Returns:

the postface text

Return type:

str

Returns the postface text for self.

New in version 3.12.

get_preface()
Returns:

the preface text

Return type:

str

Returns the preface text for self.

New in version 3.12.

set_boundary(boundary)
Parameters:

boundary (str or None) – the message boundary, or None

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

set_postface(postface)
Parameters:

postface (str) – multipat 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.

set_preface(preface)
Parameters:

preface (str) – the multipart 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.

do_add_part(part) virtual
Parameters:

part (Camel.MimePart) – a Camel.MimePart to add

Appends the Camel.part to the multipart object.

do_construct_from_parser(parser) virtual
Parameters:

parser (Camel.MimeParser) – a Camel.MimeParser object

Returns:

0 on success or -1 on fail

Return type:

int

Construct a multipart from a parser.

do_get_boundary() virtual
Returns:

the boundary

Return type:

str

do_get_number() virtual
Returns:

the number of subparts in multipart

Return type:

int

do_get_part(index) virtual
Parameters:

index (int) – a zero-based index indicating the Camel.part to get

Returns:

the indicated subpart, or None

Return type:

Camel.MimePart or None

do_set_boundary(boundary) virtual
Parameters:

boundary (str or None) – the message boundary, or None

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 None, a randomly-generated boundary will be used.