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

A

Andre

Hi guys, newbie question. I am having trouble with a script that is
supposed to login me to my account on yahoo pop server. When i do this:



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)


I am being asked for password and after giving it getting
the following error:


POP3 Protocol Error: -ERR Error logging in. Please visit
http://mail.yahoo.com


Would appreciate any help or comments -- its my first day with Python :).
What am i doing wrong?
 
K

Kartic

Andre,

Do you have a premium Yahoo account? Only premium users can access
Yahoo mail via POP3. If you are a premium account holder and it still
is not working, print out your password to see if you typed the correct
password.

Have you tried accessing your Yahoo from an email client? Does that
work?

Thanks,
-Kartic
 
A

Andre

Thank, Kartic

I actually tried doing it with several other accounts, notably mail.com and
netscape.com
When i do it with netscape the dialog goes like the following:
Traceback (most recent call last):
File "<pyshell#5>", line 1, in ?
pop.pass_("123456")
File "D:\Python24\lib\poplib.py", line 202, in pass_
return self._shortcmd('PASS %s' % pswd)
File "D:\Python24\lib\poplib.py", line 165, in _shortcmd
return self._getresp()
File "D:\Python24\lib\poplib.py", line 141, in _getresp
raise error_proto(resp)
error_proto: -ERR invalid username or password

The username and password are naturally valid, but something else is wrong.
Do you know if Netscape also doesn't allow POP access? Is there a free
e-mail provider who does?
Thanks a mil,

Andre
 
K

Kartic

Andre said the following on 2/9/2005 7:28 PM:
Thank, Kartic

I actually tried doing it with several other accounts, notably mail.com and
netscape.com
When i do it with netscape the dialog goes like the following:

The username and password are naturally valid, but something else is wrong.
Do you know if Netscape also doesn't allow POP access? Is there a free
e-mail provider who does?


Okay..this OT now!

Gmail provides pop access. Or you can use fastmail.fm, they hae a free
account option with POP3 as well as IMAP access.

Before you post any Python code, first try with some email client and
then try with Python code.

-Kartic
 
K

Kristian M Zoerhoff

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top