Package logilab :: Package common :: Module umessage :: Class UMessage

[frames] | no frames]

# Class UMessage

source code

    Encapsulates an email.Message instance and returns only unicode objects.

Instance Methods

__init__(self, message) | source code

get(self, header, default=None) | source code

__getitem__(self, header) | source code

get_all(self, header, default=()) | source code

is_multipart(self) | source code

get_boundary(self) | source code

walk(self) | source code

get_payload(self, index=None, decode=False) | source code

get_content_maintype(self) | source code

get_content_type(self) | source code

get_filename(self, failobj=None) | source code

headers(self) return an unicode string containing all the message's headers | source code

multi_addrs(self, header) return a list of 2-uple (name, address) for the given address (which... | source code

date(self, alternative_source=False, return_str=False) return a datetime object for the email's date or None if no date is... | source code

Method Details

### multi_addrs(self, header)

source code

    return a list of 2-uple (name, address) for the given address (which
    is expected to be an header containing address such as from, to, cc...)

### date(self, alternative_source=False, return_str=False)

source code

    return a datetime object for the email's date or None if no date is
    set or if it can't be parsed