From 44f045ca04e79b81cffd2beebe54f790532a724a Mon Sep 17 00:00:00 2001 From: IOWEB TECHNOLOGIES Date: Fri, 6 Jul 2018 09:36:02 +0300 Subject: [PATCH] Fix bug with smtplib and crammd5 servers that prevents email sending (#5687) * Fix bug with smtplib and crammd5 servers that prevents email sending * Use frappe.safe_decode instead of str * Revert "Use frappe.safe_decode instead of str" This reverts commit 272aa167fd86f90129517666b2cad85363026f87. * Using frappe_encode to 'ascii' to send the password * Update smtp.py * Update smtp.py --- frappe/email/smtp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/email/smtp.py b/frappe/email/smtp.py index 693001b520..3350106036 100644 --- a/frappe/email/smtp.py +++ b/frappe/email/smtp.py @@ -171,7 +171,7 @@ class SMTPServer: if self.email_account: self.server = self.email_account.smtp_server self.login = getattr(self.email_account, "login_id", None) or self.email_account.email_id - self.password = self.email_account.password + self.password = frappe.safe_encode(self.email_account.password) self.port = self.email_account.smtp_port self.use_tls = self.email_account.use_tls self.sender = self.email_account.email_id