Because pymail downloads mail from your server into a local Python list only once at
startup, though, we need to start pymail again to refetch mail from the server if we want
to see the result of the mail we sent and the deletion we made. Here, our new mail
shows up at the end as new number 6, and the original mail assigned number 4 in the
prior session is gone:
C:\...\PP4E\Internet\Email> pymail.py
Password for pop.secureserver.net?
[Pymail email client]
Connecting...
b'+OK <[email protected]>'
(b'+OK ', [b'1 1860', b'2 1408', b'3 1049', b'4 1038', b'5 957', b'6 1037'], 47)
There are 6 mail messages in 7349 bytes
Retrieving...
1: 1861 bytes
From =>[email protected]
To =>[email protected]
Date =>Wed, 5 May 2010 11:29:36 −0400 (EDT)
Subject =>I'm a Lumberjack, and I'm Okay
2: 1409 bytes
From =>[email protected]
To =>[email protected]
Date =>Wed, 05 May 2010 08:33:47 −0700
Subject =>testing
3: 1050 bytes
From =>[email protected]
To =>[email protected]
Date =>Thu, 06 May 2010 14:11:07 −0000
Subject =>A B C D E F G
4: 1039 bytes
From =>[email protected]
To =>[email protected]
Date =>Thu, 06 May 2010 14:32:32 −0000
Subject =>a b c d e f g
5: 958 bytes
From =>[email protected]
To =>maillist
Date =>Thu, 06 May 2010 10:58:40 −0400
Subject =>test interactive smtplib
[Press Enter key]
6: 1038 bytes
From =>[email protected]
To =>[email protected]
Date =>Fri, 07 May 2010 20:32:38 −0000
Subject =>Among our weapons are these
[Pymail] Action? (i, l, d, s, m, q, ?) l 6
-------------------------------------------------------------------------------
Nobody Expects the Spanish Inquisition!
-------------------------------------------------------------------------------
[Pymail] Action? (i, l, d, s, m, q, ?) q
Bye.
A Console-Based Email Client | 955