How to read email and do not mark it as READ...?
amez at swipnet.se
Sat Sep 15 13:37:45 CEST 2001
On 15 Sep 2001 00:06:28 -0700, jriveramerla at yahoo.com (Jose Rivera)
> I want to make a script that fetch the email to my HardDisk...
>pop.py and imap.py works ok, but they leave the message marked as READ
>and I don't want that...
> I know PowerBuilder can do it, so there must be a way in Python...
Using POP you have to
issue the 'command' RSET just before QUIT. See RFC 1725
import getpass, poplib
M = poplib.POP3('localhost')
numMessages = len(M.list())
for i in range(numMessages):
for j in M.retr(i+1):
# reset read flag
More information about the Python-list