Loading transfer_service/mailer.py +3 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,9 @@ class Mailer(object): smtpObj = smtplib.SMTP(self.smtpServer, self.smtpPort) smtpObj.send_message(self.message) print("Message sent!") self.logger.info("Message sent!") self.logger.debug("E-mail message sent successfully!") except OSError: self.logger.exception("Error: cannot connect to SMTP server!") except TimeoutError: self.logger.exception("Error: connection timeout!") except SMTPException: Loading Loading
transfer_service/mailer.py +3 −1 Original line number Diff line number Diff line Loading @@ -67,7 +67,9 @@ class Mailer(object): smtpObj = smtplib.SMTP(self.smtpServer, self.smtpPort) smtpObj.send_message(self.message) print("Message sent!") self.logger.info("Message sent!") self.logger.debug("E-mail message sent successfully!") except OSError: self.logger.exception("Error: cannot connect to SMTP server!") except TimeoutError: self.logger.exception("Error: connection timeout!") except SMTPException: Loading