pop3 mail download - using python.org example
Kevin F
neurogasm at gmail.com
Sat Mar 18 20:10:39 EST 2006
i'm trying to this this code to access my pop server but it only prompts
for a password and not a username, how do i get it to ask for my
username as well?
##from http://docs.python.org/lib/pop3-example.html
import getpass, poplib
M = poplib.POP3('localhost')
M.user(getpass.getuser())
M.pass_(getpass.getpass())
numMessages = len(M.list()[1])
for i in range(numMessages):
for j in M.retr(i+1)[1]:
print j
More information about the Python-list
mailing list