From 114bdb57213f53d5c4ff7e5b0f232528e1237fe8 Mon Sep 17 00:00:00 2001 From: Anand Chitipothu Date: Sat, 22 May 2021 11:00:04 +0530 Subject: [PATCH] fix: issue with sending emails The sendmail functionality got broken in recent refactoring to the email module. The call to sendmail was passing from_addr and to_addrs in the wrong order. This has been fixed. Issue #13292 --- frappe/email/doctype/email_queue/email_queue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/email/doctype/email_queue/email_queue.py b/frappe/email/doctype/email_queue/email_queue.py index 076dfc5417..9ed8c2c714 100644 --- a/frappe/email/doctype/email_queue/email_queue.py +++ b/frappe/email/doctype/email_queue/email_queue.py @@ -102,7 +102,7 @@ class EmailQueue(Document): message = ctx.build_message(recipient.recipient) if not frappe.flags.in_test: - ctx.smtp_session.sendmail(recipient.recipient, self.sender, message) + ctx.smtp_session.sendmail(from_addr=self.sender, to_addrs=recipient.recipient, msg=message) ctx.add_to_sent_list(recipient) if frappe.flags.in_test: