From 0a41c4051c2f8bb63bce2b11f45cf105200f0daf Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Thu, 14 Jul 2022 18:01:47 +0530 Subject: [PATCH] fix: Do not relay email to standard users Co-authored-by: Ritwik Puri --- frappe/core/doctype/communication/mixins.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frappe/core/doctype/communication/mixins.py b/frappe/core/doctype/communication/mixins.py index 695b8bebae..af3b0a4661 100644 --- a/frappe/core/doctype/communication/mixins.py +++ b/frappe/core/doctype/communication/mixins.py @@ -73,7 +73,8 @@ class CommunicationEmailMixin: if include_sender: cc.append(self.sender_mailid) if is_inbound_mail_communcation: - cc.append(self.get_owner()) + if (doc_owner := self.get_owner()) not in frappe.STANDARD_USERS: + cc.append(doc_owner) cc = set(cc) - {self.sender_mailid} cc.update(self.get_assignees())