1. Thomas Waldmann
  2. moin-2.0


Thomas Waldmann  committed ae88b5b

sendmail: catch unicode errors when E-Mail addr has non-ascii chars

  • Participants
  • Parent commits 6ac803a
  • Branches gae

Comments (0)

Files changed (1)

File MoinMoin/mail/sendmail.py

View file
                     except AttributeError:
                         # in case the connection failed, SMTP has no "sock" attribute
+            except UnicodeError, e:
+                logging.exception("unicode error [%r -> %r]" % (mail_from, to, ))
+                return (0, str(e))
             except smtplib.SMTPException as e:
                 logging.exception("smtp mail failed with an exception.")
                 return (0, str(e))