X Tutup
The Wayback Machine - https://web.archive.org/web/20221107203537/https://github.com/python/cpython/issues/99147
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use certain charaters on imap outlook connection #99147

Open
fghjkgcfxx56u opened this issue Nov 5, 2022 · 0 comments
Open

Unable to use certain charaters on imap outlook connection #99147

fghjkgcfxx56u opened this issue Nov 5, 2022 · 0 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@fghjkgcfxx56u
Copy link

fghjkgcfxx56u commented Nov 5, 2022

  • Operating system and architecture: Windows 10 x86_64

I am having trouble logging in to the imap server "outlook.office365.com:993", basically sometimes the passwords i use contain special characters (-"_?$%& and such) that make the login fail with error: imaplib.IMAP4.error: b'LOGIN failed.' i know that this is a problem with the characters, because it appears only when the password contains some of them, while when the password is only numbers/letters it works fine. This is the code that is causing the issue:

def get_email(username, password):
    imap = imaplib.IMAP4_SSL(host="outlook.office365.com", port=993)
    imap.login(username, password)

i have tried many different things:
-Escaping the characters with \ and another time with ^
-Writing double quotes around the special characters
and more

online there is almost no documentation/examples on it. I also am not able to change the password to the account, as much as i would like to. And it also logins fine on the outlook site

For testing purposes here is a password similar to that one:

mozz@-rell@?9torey
@fghjkgcfxx56u fghjkgcfxx56u added the type-bug An unexpected behavior, bug, or error label Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant
X Tutup