By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,680 Members | 1,744 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,680 IT Pros & Developers. It's quick & easy.

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

P: n/a
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?
Jul 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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

Jul 18 '05 #2

P: n/a
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:
POPHOST = 'pop3.isp.netscape.com'
pop = poplib.POP3(POPHOST)
POPUSER = "myusername"
pop.user(POPUSER) '+OK' pop.pass_("mypassword")
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

"Kartic" <ka******************@gmail.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com... 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

Jul 18 '05 #3

P: n/a
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
Jul 18 '05 #4

P: n/a
In article <q6********************@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
Jul 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.