|
|
@@ -5,7 +5,7 @@ from __future__ import unicode_literals, absolute_import |
|
|
|
import frappe |
|
|
|
import json |
|
|
|
from email.utils import formataddr, parseaddr |
|
|
|
from frappe.utils import get_url, get_formatted_email, cstr, cint, validate_email_add, split_emails |
|
|
|
from frappe.utils import get_url, get_formatted_email, cint, validate_email_add, split_emails |
|
|
|
from frappe.utils.file_manager import get_file |
|
|
|
import frappe.email.smtp |
|
|
|
from frappe import _ |
|
|
@@ -106,7 +106,7 @@ class Communication(Document): |
|
|
|
from frappe.tasks import sendmail |
|
|
|
sendmail.delay(frappe.local.site, self.name, |
|
|
|
print_html=print_html, print_format=print_format, attachments=attachments, |
|
|
|
recipients=recipients, cc=cc) |
|
|
|
recipients=recipients, cc=cc, lang=frappe.local.lang) |
|
|
|
|
|
|
|
def _notify(self, print_html=None, print_format=None, attachments=None, |
|
|
|
recipients=None, cc=None): |
|
|
@@ -285,7 +285,7 @@ class Communication(Document): |
|
|
|
|
|
|
|
if email_address in exclude: |
|
|
|
continue |
|
|
|
|
|
|
|
|
|
|
|
if is_cc: |
|
|
|
is_user_enabled = frappe.db.get_value("User", email_address, "enabled") |
|
|
|
if is_user_enabled==0: |
|
|
@@ -296,7 +296,7 @@ class Communication(Document): |
|
|
|
if email_address not in email_address_list: |
|
|
|
# append the full email i.e. "Human <human@example.com>" |
|
|
|
filtered.append(email) |
|
|
|
email_address_list.append(email_address) |
|
|
|
email_address_list.append(email_address) |
|
|
|
|
|
|
|
return filtered |
|
|
|
|
|
|
|