Skip to content

_client

Client(config)

An encapsulation of an IMAP Client. This client is underpinned by either a IMAP4 client if port 143 is provided otherwise it utilises an IMAP4_SSL Client.

Parameters:

Name Type Description Default
config Config

The clipmap config object instance.

required

total_mailboxes: int property

Retrieve the total number of mail boxes in the server.

total_mails: int property

Retrieve the total number of emails in all mailboxes.

__exit__(exc_type=None, exc_val=None, exc_tb=None)

Allow the client to be used as a context manager itself.

close()

Close the underlying imap client.

initialise_client()

Initialise the underlying wrapped client.

retrieve_mailboxes(directory='""', pattern='*')

Retrieves all the mailboxes available in the server.

Parameters:

Name Type Description Default
directory str

The directory to recurse, top-level by default.

'""'
pattern str

Pattern to apply to names, matches anything by default.

'*'