New submission from Oliver Merkel: class SMTP: def auth_login(self, challenge=None):
The self.docmd should use cmd "AUTH" with parameter "LOGIN" + encoded login like (code, resp) = self.docmd("AUTH", "LOGIN " + encode_base64(self.user.encode('ascii'), eol='')) with def auth(self, mechanism, authobject, *, initial_response_ok=True): that should not send a "AUTH" in self.docmd in case the mechanism is 'LOGIN' and if initial_response is not None: meaning if mechanism == 'LOGIN': (code, resp) = self.docmd(response) else: (code, resp) = self.docmd("AUTH", mechanism + " " + response) --- Could someone kindly review, evtly come up with better suggestion? In short: $ diff /c/Python35/Lib/smtplib-old.py /c/Python35/Lib/smtplib.py 630c630,633 < (code, resp) = self.docmd("AUTH", mechanism + " " + response) --- > if mechanism == 'LOGIN': > (code, resp) = self.docmd(response) > else: > (code, resp) = self.docmd("AUTH", mechanism + " " + response) 660c663 < (code, resp) = self.docmd( --- > (code, resp) = self.docmd("AUTH", "LOGIN " + ---------- components: email messages: 253225 nosy: barry, merkel, r.david.murray priority: normal severity: normal status: open title: smtplib.py AUTH LOGIN code messed up sending login and password data since 3.5 type: behavior versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25446> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com