Running the script for the 2-nd time, the messages are not retrieved from the mail server
- by Max Li
I read the mails from my gmail account with the code following below.
import poplib
pop_conn = poplib.POP3_SSL('pop.gmail.com')
pop_conn.user('user') # result: '+OK send PASS'
pop_conn.pass_('password') # result: '+OK Welcome.'
print pop_conn.list()[1]
pop_conn.quit()
It shows me 1 message as expected.
However, if I run this script for the second time, I get 0 messages as result. On the server the message is still there and unread.
How can I get all the messages also running the script for the second time?
For me it behaves as an email client that doesn't download the same mail twice. Is there some flag to force the program to download everything again?
I use python 2.7.x on ubuntu 12.10