invalidroutesreporter.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:invalidroutesreporter 作者: pierky 项目源码 文件源码
def _send_email(self, from_addr, to_addrs, msg):
        if self._connect_smtp():
            try:
                try:
                    self.smtp_connection.sendmail(from_addr, to_addrs, msg)
                    return
                except smtplib.SMTPServerDisconnected as e:
                    logging.debug("SMTP disconnected: {} - reconnecting".format(str(e)))

                    if self._connect_smtp(force=True):
                        self.smtp_connection.sendmail(from_addr, to_addrs, msg)
                        return
            except Exception as e:
                logging.error("Error while sending email to {}: "
                              "{}".format(email_addresses, str(e)),
                              exc_info=True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号