loaded; if you really want to not see an email on a later load, you must explicitly
delete it.
Entries in the main list show just enough to give the user an idea of what the message
contains—each entry gives the concatenation of portions of the message’s Subject,
From, Date, To, and other header lines, separated by | characters and prefixed with
the message’s POP number (e.g., there are 13 emails in this list). Columns are aligned
by determining the maximum size needed for any entry, up to a fixed maximum, and
the set of headers displayed can be configured in the mailconfig module. Use the hor-
izontal scroll or expand the window to see additional header details such as message
size and mailer.
As we’ve seen, a lot of magic happens when downloading email—the client (the ma-
chine on which PyMailGUI runs) must connect to the server (your email account ma-
chine) over a socket and transfer bytes over arbitrary Internet links. If things go wrong,
PyMailGUI pops up standard error dialog boxes to let you know what happened. For
example, if you type an incorrect username or password for your account (in the mail
config module or in the password pop up), you’ll receive the message in Fig-
ure 14-11. The details displayed here are just the Python exception type and exception
data. Additional details, including a stack trace, show up in standard output (the con-
sole window) on errors.
Figure 14-11. PyMailGUI invalid password error box
Offline Processing with Save and Open
We’ve seen how to fetch and view emails from a server, but PyMailGUI can also be
used in completely offline mode. To save mails in a local file for offline processing,
select the desired messages in any mail list window and press the Save action button;
as usual, any number of messages may be selected for saving together as a set. A
standard file-selection dialog appears, like that in Figure 14-12, and the mails are saved
to the end of the chosen text file.
A PyMailGUI Demo| 1031