X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/2e9d59591e9cfc93c24a96b9dc51ce5dd2ce5a03..e5cd988563f154900222d31e63cf51c9903506e9:/forum/utils/mail.py 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)