imapclient icon indicating copy to clipboard operation
imapclient copied to clipboard

login with unicode password

Open tshirtman opened this issue 5 years ago • 2 comments

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.

tshirtman avatar May 05 '19 11:05 tshirtman

I'll look into this more once we've moved to supporting Python 3 only. It'll be easier to fix properly then.

mjs avatar Jul 19 '20 10:07 mjs

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

jrlevine avatar Aug 25 '20 21:08 jrlevine