diff --git a/frappe/core/doctype/communication/email.py b/frappe/core/doctype/communication/email.py index e9464a5a5b..8121e13788 100755 --- a/frappe/core/doctype/communication/email.py +++ b/frappe/core/doctype/communication/email.py @@ -373,11 +373,6 @@ def get_bcc(doc, recipients=None, fetched_from_email_account=False): """Build a list of email addresses for BCC""" bcc = split_emails(doc.bcc) - if doc.reference_doctype and doc.reference_name: - if fetched_from_email_account: - bcc.append(get_owner_email(doc)) - bcc += get_assignees(doc) - if bcc: exclude = [] exclude += [d[0] for d in frappe.db.get_all("User", ["name"], {"thread_notify": 0}, as_list=True)] diff --git a/frappe/email/queue.py b/frappe/email/queue.py index fd0f05767b..f810c6abcf 100755 --- a/frappe/email/queue.py +++ b/frappe/email/queue.py @@ -204,7 +204,8 @@ def get_email_queue(recipients, sender, subject, **kwargs): frappe.log_error('Invalid Email ID Sender: {0}, Recipients: {1}'.format(mail.sender, ', '.join(mail.recipients)), 'Email Not Sent') - e.set_recipients(recipients + kwargs.get('cc', []) + kwargs.get('bcc', [])) + recipients = list(set(recipients + kwargs.get('cc', []) + kwargs.get('bcc', []))) + e.set_recipients(recipients) e.reference_doctype = kwargs.get('reference_doctype') e.reference_name = kwargs.get('reference_name') e.add_unsubscribe_link = kwargs.get("add_unsubscribe_link")