Commits

Roger Haase committed 2f92307

fix traceback when email not configured

  • Participants
  • Parent commits aad93e2

Comments (0)

Files changed (1)

File MoinMoin/mail/sendmail.py

     from email.Utils import formatdate, make_msgid
 
     cfg = app.cfg
+    if not cfg.mail_enabled:
+        return (0, _("Contact administrator: cannot send password recovery e-mail because mail configuration is incomplete."))
     mail_from = mail_from or cfg.mail_from
 
     logging.debug("send mail, from: {0!r}, subj: {1!r}".format(mail_from, subject))