imbox

class imbox.Imbox(hostname, username=None, password=None, ssl=True)[source]

Bases: object

The Imbox is a container for a connection to a maibox or a server.

fetch_by_uid(uid)[source]

Fetches a message using some magic called BODY.Peek

return: an email object

fetch_list(data)[source]
messages(*args, **kwargs)[source]
class imbox.imap.ImapTransport(hostname, port=None, ssl=False)[source]

Bases: object

connect(username, password)[source]

Connect to the IMAP server

list_folders()[source]

returns a py:’list’ of strings

class imbox.parser.Struct(**entries)[source]

Bases: object

keys()[source]
imbox.parser.decode_mail_header(value, default_charset='us-ascii')[source]

Decode a header value into a unicode string.

imbox.parser.get_mail_addresses(message, header_name)[source]

Retrieve all email addresses from one message header.

imbox.parser.parse_attachment(message_part)[source]
imbox.parser.parse_email(raw_email)[source]