Package svnmailer :: Package notifier :: Module _multimail :: Class _SinglePart
[show private | hide private]
[frames | no frames]

Class _SinglePart

 Message --+        
           |        
    MIMEBase --+    
               |    
MIMENonMultipart --+
                   |
                  _SinglePart


A single part of a multipart mail
Method Summary
  __init__(self, body, name, encoding, binary, ctype, dispo)
Initialization
list _encodeRfc2184(self, value, dosplit)
Encode a string (parameter value) according to RFC 2184
int getSize(self)
Serializes the mail into a descriptor
    Inherited from MIMENonMultipart
  attach(self, payload)
Add the given payload to the current payload.
    Inherited from Message
  __contains__(self, name)
  __delitem__(self, name)
Delete all occurrences of a header, if present.
  __getitem__(self, name)
Get a header value.
  __len__(self)
Return the total number of headers, including duplicates.
  __setitem__(self, name, val)
Set the value of a header.
  __str__(self)
Return the entire formatted message as a string.
  add_header(self, _name, _value, **_params)
Extended header setting.
  add_payload(self, payload)
Add the given payload to the current payload.
  as_string(self, unixfrom)
Return the entire formatted message as a string.
  del_param(self, param, header, requote)
Remove the given parameter completely from the Content-Type header.
  get(self, name, failobj)
Get a header value.
  get_all(self, name, failobj)
Return a list of all the values for the named field.
  get_boundary(self, failobj)
Return the boundary associated with the payload if present.
  get_charset(self)
Return the Charset instance associated with the message's payload.
  get_charsets(self, failobj)
Return a list containing the charset(s) used in this message.
  get_content_charset(self, failobj)
Return the charset parameter of the Content-Type header.
  get_content_maintype(self)
Return the message's main content type.
  get_content_subtype(self)
Returns the message's sub-content type.
  get_content_type(self)
Return the message's content type.
  get_default_type(self)
Return the `default' content type.
  get_filename(self, failobj)
Return the filename associated with the payload if present.
  get_main_type(self, failobj)
Return the message's main content type if present.
  get_param(self, param, failobj, header, unquote)
Return the parameter value if found in the Content-Type header.
  get_params(self, failobj, header, unquote)
Return the message's Content-Type parameters, as a list.
  get_payload(self, i, decode)
Return a reference to the payload.
  get_subtype(self, failobj)
Return the message's content subtype if present.
  get_type(self, failobj)
Returns the message's content type.
  get_unixfrom(self)
  has_key(self, name)
Return true if the message contains the header.
  is_multipart(self)
Return True if the message consists of multiple parts.
  items(self)
Get all the message's header fields and values.
  keys(self)
Return a list of all the message's header field names.
  replace_header(self, _name, _value)
Replace a header.
  set_boundary(self, boundary)
Set the boundary parameter in Content-Type to 'boundary'.
  set_charset(self, charset)
Set the charset of the payload to a given character set.
  set_default_type(self, ctype)
Set the `default' content type.
  set_param(self, param, value, header, requote, charset, language)
Set a parameter in the Content-Type header.
  set_payload(self, payload, charset)
Set the payload to the given value.
  set_type(self, type, header, requote)
Set the main type and subtype for the Content-Type header.
  set_unixfrom(self, unixfrom)
  values(self)
Return a list of all the message's header values.
  walk(self)
Walk over the message tree, yielding each subpart.
  _get_params_preserve(self, failobj, header)

Method Details

__init__(self, body, name=None, encoding=None, binary=False, ctype='text/plain', dispo='inline')
(Constructor)

Initialization
Parameters:
body - The body
           (type=str)
Overrides:
email.MIMEBase.MIMEBase.__init__

_encodeRfc2184(self, value, dosplit=False)

Encode a string (parameter value) according to RFC 2184
Parameters:
value - The value to encode
           (type=unicode)
dosplit - Allow long parameter splitting? (Note that is not widely supported...)
           (type=bool)
Returns:
The list of encoded values
           (type=list)

getSize(self)

Serializes the mail into a descriptor
Returns:
The size of the serialized object
           (type=int)

Generated by Epydoc 2.0 on Sun Sep 25 20:49:16 2005 http://epydoc.sf.net