Package ProcImap :: Package Utils :: Module Server
[hide private]
[frames] | no frames]

Module Server

source code

This module contains functions that work directly on an online ImapServer/ImapMailbox.

Functions [hide private]
 
display(mailbox, uid, pager='less', headerfields=None)
Display a stripped down version of the message with UID in a pager.
source code
 
summary(mailbox, uids, printout=True, printuid=True)
generates lines showing some basic information about the messages with the supplied uids.
source code
Variables [hide private]
  DEFAULT_PAGER = 'less'
Function Details [hide private]

display(mailbox, uid, pager='less', headerfields=None)

source code 

Display a stripped down version of the message with UID in a pager. The displayed message will contain the the header fields set in 'headerfields', and the first BODY section (which is usually the human-readable part)

headerfields defaults to ['Date', 'From', 'To', 'Subject'] contrary to the declaration.

summary(mailbox, uids, printout=True, printuid=True)

source code 

generates lines showing some basic information about the messages with the supplied uids. Non-existing UIDs in the list are silently ignored.

If printout is True, the lines are printed out as they are generated, and the function returns nothing, otherwise, nothing is printed out and the function returns a list of generated lines.

The summary contains 1) an index (the uid if printuid=True) 2) the from name (or from address), truncated 3) the date of the message 4) the subject, truncated

Each line has the indicated fields truncated so that it is at most 79 characters wide.