fix(email): Pass args as unicode in Py2 & bytes in Py3 to SMTP.login

This commit is contained in:
Aditya Hase 2019-01-22 23:01:14 +05:30
parent e23faaf79a
commit 7a12d3399f

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: