From: jordan Date: Wed, 16 Mar 2011 00:23:29 +0000 (+0000) Subject: merge notification-config -> trunk, previous commits 695, 751 (email debugging inform... X-Git-Tag: live~417 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/d83e8cc24ef61b6871f0e7862c6193cd20973eab merge notification-config -> trunk, previous commits 695, 751 (email debugging information) git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@850 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/utils/mail.py b/forum/utils/mail.py index 7a61292..88b5f18 100644 --- a/forum/utils/mail.py +++ b/forum/utils/mail.py @@ -1,6 +1,7 @@ import email import socket import os +import logging try: from email.mime.multipart import MIMEMultipart @@ -78,11 +79,11 @@ def create_and_send_mail_messages(messages): try: connection.sendmail(sender, [recipient.email], msgRoot.as_string()) except Exception, e: - pass + logging.error("Couldn't send mail using the sendmail method: %s" % e) try: connection.quit() except socket.sslerror: connection.close() except Exception, e: - pass + logging.error('Email sending has failed: %s' % e)