(optional) the maximum number of mail headers or messages that will be
downloaded on each load request; given this setting N, PyMailGUI fetches at
most N of the most recently arrived mails; older mails outside this set are
not fetched from the server, but are displayed as empty/dummy emails; if this
is assigned to None (or 0), loads will have no such limit; use this if you
have very many mails in your inbox, and your Internet or mail server speed
makes full loads too slow to be practical; PyMailGUI also loads only
newly-arrived headers, but this setting is independent of that feature;
#-------------------------------------------------------------------------------
fetchlimit = 50 # maximum number headers/emails to fetch on loads
#-------------------------------------------------------------------------------
(optional) initial width, height of mail index lists (chars x lines); just
a convenience, since the window can be resized/expanded freely once opened;
#-------------------------------------------------------------------------------
listWidth = None # None = use default 74
listHeight = None # None = use default 15
#-------------------------------------------------------------------------------
(optional, for reply) if True, the Reply operation prefills the reply's Cc
with all original mail recipients, after removing duplicates and the new sender;
if False, no CC prefill occurs, and the reply is configured to reply to the
original sender only; the Cc line may always be edited later, in either case.
#-------------------------------------------------------------------------------
repliesCopyToAll = True # True=reply to sender + all recipients, else sender
#end
textConfig: Customizing Pop-Up PyEdit Windows
The prior section’s mailconfig module provides user settings for tailoring the PyEdit
component used to view and edit main mail text, but PyMailGUI also uses PyEdit to
display other kinds of pop-up text, including raw mail text, some text attachments, and
source code in its help system. To customize display for these pop ups, PyMailGUI
relies on PyEdit’s own utility, which attempts to load a module like that in Exam-
ple 14-10 from the client application’s own directory. By contrast, PyEdit’s Unicode
settings are loaded from the single textConfig module in its own package’s directory
since they are not expected to vary across a platform (see Chapter 11 for more details).
Example 14-10. PP4E\Internet\Email\PyMailGui\textConfig.py
"""
customize PyEdit pop-up windows other than the main mail text component;
this module (not its package) is assumed to be on the path for these settings;
PyEdit Unicode settings come from its own package's textConfig.py, not this;
"""
bg = 'beige' # absent=white; colorname or RGB hexstr
fg = 'black' # absent=black; e.g., 'beige', '#690f96'
1110 | Chapter 14: The PyMailGUI Client