imapclient
imapclient copied to clipboard
login with unicode password
Not sure if the issue lies on the side of imapclient or python's imaplib, but to be able to connect using a non-ascii password, i need to do
client = IMAPClient(host, use_uid=True, ssl=True)
client._imap._mode_utf8() # this line shouldn't be needed, or at least not use private objects/methods
client.login(user, password)
It seems imaplib supports logging with unicode username/passwords, but using the authenticate
method, but the only usage seems to be for login_cram_md5
, i didn't look into making an authobject for login method yet, maybe it's possible, but IMAPClient doesn't expose the authenticate method anyway.
I'll look into this more once we've moved to supporting Python 3 only. It'll be easier to fix properly then.
AUTH=PLAIN via plain_login() works with Unicode the regular login() isn't supposed to support anything other than ASCII, gotta use AUTH if you use Unicode