diff --git a/Report.py b/Report.py index 981d7ee..b8f71ea 100644 --- a/Report.py +++ b/Report.py @@ -56,7 +56,11 @@ class Report(object): # pylint: disable=useless-object-inheritance subject=self.subject or subject, text_body=content ) - return email_client.send(self.rcpt_to or rcpt_to, msg=msg, just_try=just_try) + if email_client.send(self.rcpt_to or rcpt_to, msg=msg, just_try=just_try): + logging.debug('Report sent to %s', self.rcpt_to or rcpt_to) + return True + logging.error('Fail to send report to %s', self.rcpt_to or rcpt_to) + return False def send_at_exit(self, **kwargs): """ Send report at exit """