Search code examples
pythonyahoo-mail

Yahoo incorrect username or password?


I created yahoo email via web interface, have enabled pop3 access(set auto), but still get following error:

poplib.error_proto: -ERR [AUTH] (#MBR1212) Incorrect username or password.

My python script.

import poplib
oMailBox = poplib.POP3_SSL('pop.mail.yahoo.com', port=995)
oMailBox.user(username)
oMailBox.pass_(password)

Solution

  • I just tried using your code on my Yahoo account, and I get the same error, but I also have a secondary email that tells me when unrecognized access happens on that account, in which case I see the below message.

    Seems though you may have to also disable security on your account as well as enable POP3.

    Someone attempted to sign in to your Yahoo account ({ACCOUNT_NAME}) from an app that doesn't meet Yahoo's security standards. We blocked this sign in attempt, which was made on:

    {DATE} from {LOCATION}.

    If you were trying to sign in, then please take one of these actions:

    Option 1 (recommended): Use mail.yahoo.com or the Yahoo Mail app for Android and iOS to more securely access your account.

    Option 2 (not recommended): If you still want to use an app that uses less secure sign in to your Yahoo account:

    Click here: https://login.yahoo.com/account/security#other-apps

    Turn on "Allow apps that use less secure sign in"

    Go back to your existing email application and sign in to your Yahoo account again.

    Using apps that don't meet Yahoo's recommended security standards may leave your account more vulnerable or less secure.