Package lamson :: Module encoding :: Class MIMEPart
[hide private]
[frames] | no frames]

Class MIMEPart

source code


A reimplementation of nearly everything in email.mime to be more useful for actually attaching things. Rather than one class for every type of thing you'd encode, there's just this one, and it figures out how to encode what you ask it.

Instance Methods [hide private]
 
__init__(self, type, **params)
This constructor adds a Content-Type: and a MIME-Version: header.
source code
 
add_text(self, content) source code
 
extract_payload(self, mail) source code
 
__repr__(self) source code

Inherited from email.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 email.message.Message (private): _get_params_preserve

Method Details [hide private]

__init__(self, type, **params)
(Constructor)

source code 

This constructor adds a Content-Type: and a MIME-Version: header.

The Content-Type: header is taken from the _maintype and _subtype arguments. Additional parameters for this header are taken from the keyword arguments.

Overrides: email.message.Message.__init__

add_text(self, content)

source code 

extract_payload(self, mail)

source code 

__repr__(self)
(Representation operator)

source code