From af4c6e253c7e07e4d258ae66145b70fe76d5590a Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 27 Mar 2014 22:09:37 +0000 Subject: [PATCH] Exclude empty email addresses from the send list. - Legacy-Id: 7552 --- ietf/utils/mail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/utils/mail.py b/ietf/utils/mail.py index 4c6603331..7fc7a521d 100644 --- a/ietf/utils/mail.py +++ b/ietf/utils/mail.py @@ -71,7 +71,7 @@ def send_smtp(msg, bcc=None): addrlist = msg.get_all('To') + msg.get_all('Cc', []) if bcc: addrlist += [bcc] - to = [addr for name, addr in getaddresses(addrlist)] + to = [addr for name, addr in getaddresses(addrlist) if addr != '' ] if not to: log("No addressees for email from '%s', subject '%s'. Nothing sent." % (frm, msg.get('Subject', '[no subject]'))) else: