Package email :: Package mime :: Module multipart :: Class MIMEMultipart
[hide private]
[frames] | no frames]

_ClassType MIMEMultipart

message.Message --+    
      base.MIMEBase --+

Base class for MIME multipart/* type messages.

Instance Methods [hide private]
__init__(self, _subtype='mixed', boundary=None, _subparts=None, **_params)
Creates a multipart/* type message.

Inherited from message.Message: __contains__, __delitem__, __getitem__, __len__, __setitem__, __str__, add_header, as_string, attach, del_param, get, get_all, get_boundary, get_charset, get_charsets, get_content_charset, get_content_maintype, get_content_subtype, get_content_type, get_default_type, get_filename, get_param, get_params, get_payload, get_unixfrom, has_key, is_multipart, items, keys, replace_header, set_boundary, set_charset, set_default_type, set_param, set_payload, set_type, set_unixfrom, values

Inherited from message.Message (private): _get_params_preserve

Imports: walk

Method Details [hide private]

__init__(self, _subtype='mixed', boundary=None, _subparts=None, **_params)


Creates a multipart/* type message.

By default, creates a multipart/mixed message, with proper Content-Type and MIME-Version headers.

_subtype is the subtype of the multipart content type, defaulting to `mixed'.

boundary is the multipart boundary string. By default it is calculated as needed.

_subparts is a sequence of initial subparts for the payload. It must be an iterable object, such as a list. You can always attach new subparts to the message by using the attach() method.

Additional parameters for the Content-Type header are taken from the keyword arguments (or passed into the _params argument).

Overrides: message.Message.__init__