]> git.openstreetmap.org Git - osqa.git/commitdiff
merge notification-config -> trunk, previous commits 695, 751 (email debugging inform...
authorjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 16 Mar 2011 00:23:29 +0000 (00:23 +0000)
committerjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Wed, 16 Mar 2011 00:23:29 +0000 (00:23 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@850 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/utils/mail.py

index 7a61292d6f61dd923168ae0b348f2cc5b77eb9d6..88b5f1881ca3ee1297f433f3cb541fcdf78bfdc8 100644 (file)
@@ -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)