Show all recipients in sent-to message

This commit is contained in:
Nabin Hait 2015-06-19 00:15:53 +05:30
parent da2c7c8683
commit f7016664cc
3 changed files with 6 additions and 3 deletions

View file

@ -254,7 +254,10 @@ def make(doctype=None, name=None, content=None, subject=None, sent_or_received =
recipients = comm.get_recipients()
comm.send(print_html, print_format, attachments, send_me_a_copy=send_me_a_copy, recipients=recipients)
return ", ".join(recipients) if recipients else None
return {
"name": comm.name,
"recipients": ", ".join(recipients) if recipients else None
}
@frappe.whitelist()
def get_convert_to():

View file

@ -90,7 +90,7 @@ class TestEmailAccount(unittest.TestCase):
# send
sent_name = make(subject = "Test", content="test content",
recipients="test_receiver@example.com", sender="test@example.com",
send_email=True)
send_email=True)["name"]
sent_mail = email.message_from_string(frappe.get_last_doc("Bulk Email").message)
with open(os.path.join(os.path.dirname(__file__), "test_mails", "reply-1.raw"), "r") as f:

View file

@ -328,7 +328,7 @@ frappe.views.CommunicationComposer = Class.extend({
callback: function(r) {
if(!r.exc) {
if(form_values.send_email)
msgprint(__("Email sent to {0}", [r.message]));
msgprint(__("Email sent to {0}", [r.message["recipients"]]));
me.dialog.hide();
if (cur_frm) {