Mercurial > moin > 1.9
changeset 5256:e2dcd2e9b73a
sendmail: check for empty recipients list, avoid SMTPException
author | Thomas Waldmann <tw AT waldmann-edv DOT de> |
---|---|
date | Sat, 07 Nov 2009 18:29:36 +0100 |
parents | ec00e39ec3f8 |
children | c85a99b5d78f |
files | MoinMoin/mail/sendmail.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/mail/sendmail.py Sat Nov 07 18:09:23 2009 +0100 +++ b/MoinMoin/mail/sendmail.py Sat Nov 07 18:29:36 2009 +0100 @@ -78,6 +78,9 @@ logging.debug("send mail, from: %r, subj: %r" % (mail_from, subject)) logging.debug("send mail, to: %r" % (to, )) + + if not to: + return (1, _("No recipients, nothing to do")) subject = subject.encode(config.charset)