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
This commit is contained in:
Anand Chitipothu 2021-05-22 11:00:04 +05:30
parent 8e9432e40d
commit 114bdb5721

View file

@ -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: