Merge pull request #5121 from laughsuggestion/develop
smtplib login expects strings for username and password
This commit is contained in:
commit
85fd2e15bb
2 changed files with 2 additions and 3 deletions
|
|
@ -191,8 +191,7 @@ class SMTPServer:
|
|||
self._sess.ehlo()
|
||||
|
||||
if self.login and self.password:
|
||||
ret = self._sess.login((self.login or "").encode('utf-8'),
|
||||
(self.password or "").encode('utf-8'))
|
||||
ret = self._sess.login((self.login or ""), (self.password or ""))
|
||||
|
||||
# check if logged correctly
|
||||
if ret[0]!=235:
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ def get_static_file_response():
|
|||
raise NotFound
|
||||
|
||||
response = Response(wrap_file(frappe.local.request.environ, f), direct_passthrough=True)
|
||||
response.mimetype = mimetypes.guess_type(frappe.flags.file_path)[0] or b'application/octet-stream'
|
||||
response.mimetype = mimetypes.guess_type(frappe.flags.file_path)[0] or 'application/octet-stream'
|
||||
return response
|
||||
|
||||
def build_response(path, data, http_status_code, headers=None):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue