Skip to content

Commit af4c6e2

Browse files
committed
Exclude empty email addresses from the send list.
- Legacy-Id: 7552
1 parent 521b424 commit af4c6e2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ietf/utils/mail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def send_smtp(msg, bcc=None):
7171
addrlist = msg.get_all('To') + msg.get_all('Cc', [])
7272
if bcc:
7373
addrlist += [bcc]
74-
to = [addr for name, addr in getaddresses(addrlist)]
74+
to = [addr for name, addr in getaddresses(addrlist) if addr != '' ]
7575
if not to:
7676
log("No addressees for email from '%s', subject '%s'. Nothing sent." % (frm, msg.get('Subject', '[no subject]')))
7777
else:

0 commit comments

Comments
 (0)