MCPcopy Create free account
hub / github.com/C3ting/ARL / push_email

Method push_email

app/tasks/github.py:256–266  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

254 logger.warning(self.keyword, e)
255
256 def push_email(self):
257 try:
258 if Config.EMAIL_HOST and Config.EMAIL_USERNAME and Config.EMAIL_PASSWORD:
259 html_report = self.build_html_report()
260 push.send_email(host=Config.EMAIL_HOST, port=Config.EMAIL_PORT, mail=Config.EMAIL_USERNAME,
261 password=Config.EMAIL_PASSWORD, to=Config.EMAIL_TO,
262 title="[Github--{}] 灯塔消息推送".format(self.keyword), html=html_report)
263 logger.info("send email succ")
264 return True
265 except Exception as e:
266 logger.warning(self.keyword, e)
267
268 def run(self):
269 self.set_start_time()

Callers 1

push_msgMethod · 0.95

Calls 1

build_html_reportMethod · 0.95

Tested by

no test coverage detected