Help: retrieving e-mail from yahoo pop server. what's wrong?

Kristian M Zoerhoff kristian.zoerhoff at gmail.com
Wed Feb 9 22:44:53 EST 2005


In article <q6idnUufKYXN8pffRVn-pA at rcn.net>, Andre wrote:
> 
> import getpass, poplib, re
> POPHOST = "pop.mail.yahoo.com"
> POPUSER = "mylogin"
> POPPASS = "mypass"
> pop = poplib.POP3(POPHOST)
> pop.user(POPUSER)
> 
> 
> up to this point evertything proceeds fine, but when i do
> 
> 
> if not POPPASS:> 
> POPPASS = getpass.getpass("Password for %s@%s:" % (POPUSER, POPHOST))
> pop.pass_(POPPASS)

Wait a tic. The 'if not POPPASS' should only work if POPPASS is set to '',
not if it's set to 'mypass'. Are you really being prompted for your 
password in this case? If you really are being prompted, then either you
don't have a valid POP3 account at Yahoo (you have to pay or be using
SBC Yahoo DSL to have it), or you haven't enabled it (you have to do this
in your Yahoo mail options).

Make double sure you can access POP3 mail via another client like Outlook
or Thunderbird as well, to ensure that POP3 works at all. If you can't get
it to work in those clients, you won't get it to work in Python, either.

-- 
zoerhoff(AT)sdf.lonestar.org 
kristian.zoerhoff(AT)gmail.com



More information about the Python-list mailing list