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

Discussion in 'Python' started by Andre, Feb 9, 2005.

  1. Andre

    Andre Guest

    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?
     
    Andre, Feb 9, 2005
    #1
    1. Advertising

  2. Andre

    Kartic Guest

    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
     
    Kartic, Feb 9, 2005
    #2
    1. Advertising

  3. Andre

    Andre Guest

    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" <> wrote in message
    news:...
    > 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
    >
     
    Andre, Feb 10, 2005
    #3
  4. Andre

    Kartic Guest

    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
     
    Kartic, Feb 10, 2005
    #4
  5. In article <>, 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
     
    Kristian M Zoerhoff, Feb 10, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jignesh
    Replies:
    4
    Views:
    1,268
    Paulus de Boska
    Jan 27, 2006
  2. T
    Replies:
    3
    Views:
    343
  3. checoo
    Replies:
    0
    Views:
    560
    checoo
    Dec 25, 2006
  4. 7stud --

    retrieving yahoo! mail ?

    7stud --, Sep 18, 2007, in forum: Ruby
    Replies:
    1
    Views:
    108
    7stud --
    Sep 18, 2007
  5. Tadeusz Bochan

    retrieving Yahoo mail with Net::IMAP

    Tadeusz Bochan, Aug 23, 2009, in forum: Ruby
    Replies:
    10
    Views:
    213
    G_ F_
    Aug 24, 2009
Loading...

Share This Page