From f7ffcbf423d11f26344aba20c0e8489dd19aa35e Mon Sep 17 00:00:00 2001 From: Javier Wong Date: Mon, 27 Mar 2017 17:41:12 +0800 Subject: [PATCH] [enhancement] Email Alert - Allow email_by_document_field to have multiple emails separated by comma (#2936) --- frappe/email/doctype/email_alert/email_alert.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frappe/email/doctype/email_alert/email_alert.py b/frappe/email/doctype/email_alert/email_alert.py index e4338c6f23..21cf2b88f5 100755 --- a/frappe/email/doctype/email_alert/email_alert.py +++ b/frappe/email/doctype/email_alert/email_alert.py @@ -99,7 +99,9 @@ def get_context(context): continue if recipient.email_by_document_field: if validate_email_add(doc.get(recipient.email_by_document_field)): - recipients.append(doc.get(recipient.email_by_document_field)) + recipient.email_by_document_field = doc.get(recipient.email_by_document_field).replace(",", "\n") + recipients = recipients + recipient.email_by_document_field.split("\n") + # else: # print "invalid email" if recipient.cc: