diff --git a/py/webnotes/utils/email_lib/send.py b/py/webnotes/utils/email_lib/send.py index 2071e24a65..7b02683182 100644 --- a/py/webnotes/utils/email_lib/send.py +++ b/py/webnotes/utils/email_lib/send.py @@ -42,9 +42,12 @@ class EMail: Charset.add_charset('utf-8', Charset.QP, Charset.QP, 'utf-8') if isinstance(recipients, basestring): - recipients = recipients.replace(';', ',') + recipients = recipients.replace(';', ',').replace(' ', '').replace('\n', '') recipients = recipients.split(',') + # remove null + recipients = filter(None, recipients) + self.from_defs = from_defs self.sender = sender self.reply_to = reply_to or sender