]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/utils/mail.py
merge notification-config -> trunk, previous commits 695, 751 (email debugging inform...
[osqa.git] / 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)