Package email :: Module MIMENonMultipart :: Class MIMENonMultipart
[show private | hide private]
[frames | no frames]

Class MIMENonMultipart

Message --+    
          |    
   MIMEBase --+
              |
             MIMENonMultipart


Base class for MIME multipart/* type messages.

Method Summary
  attach(self, payload)
Add the given payload to the current payload.
    Inherited from MIMEBase
  __init__(self, _maintype, _subtype, **_params)
This constructor adds a Content-Type: and a MIME-Version: header.
    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.

Method Details

attach(self, payload)

Add the given payload to the current payload.

The current payload will always be a list of objects after this method
is called.  If you want to set the payload to a scalar object, use
set_payload() instead.
Overrides:
email.Message.Message.attach (inherited documentation)

Generated by Epydoc 2.0 on Mon Feb 14 16:49:18 2005 http://epydoc.sf.net