Merge pull request #6807 from adityahase/fix-mail

fix(email): Pass args as unicode in Py2 & bytes in Py3 to SMTP.login
This commit is contained in:
Suraj Shetty 2019-01-23 20:53:25 +05:30 committed by GitHub
commit fdecd002b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -210,7 +210,7 @@ class SMTPServer:
self._sess.ehlo()
if self.login and self.password:
ret = self._sess.login((self.login or ""), (self.password or ""))
ret = self._sess.login(str(self.login or ""), str(self.password or ""))
# check if logged correctly
if ret[0]!=235: