import email
import socket
import os
+import logging
try:
from email.mime.multipart import MIMEMultipart
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)