Remove null entries from recipients
This commit is contained in:
parent
3b44b928b3
commit
3eba63dc3c
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue