Unable to use certain charaters on imap outlook connection
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 77.2k
- Forks
- 36k
- Ø Merge
- 1 T. 9 Std.
- Gemergte PRs (30 T.)
- 558
Beschreibung
- 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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit den im Bericht gezeigten imaplib.IMAP4_SSL- und login-Aufrufen und reproduziere dann den Fehler gegen outlook.office365.com:993 mit Passwörtern mit und ohne Sonderzeichen. Vergleiche die beobachtete Antwort LOGIN failed und ermittle, ob das Problem in imaplib oder in der Serverinteraktion liegt; abgeschlossen ist die Aufgabe mit einer reproduzierbaren Diagnose und einem fokussierten Regressionstest oder einer dokumentierten Begründung, warum keine Änderung an der Bibliothek anwendbar ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- networking
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100