backup.py 文件源码

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

项目:backuper 作者: antirek 项目源码 文件源码
def _send_mime_text_to_email(self, text, email):
        """

        :type text: mime_text.MIMEText
        :type email: str
        :return:
        """
        text['To'] = email
        try:
            pass
            connection = smtplib.SMTP(self._smtp_config['host'])
            connection.ehlo()
            connection.starttls()
            connection.ehlo()
            connection.login(self._smtp_config['username'], self._smtp_config['password'])
            connection.sendmail(self._smtp_config['sender'], email, text.as_string())
            connection.quit()
        except smtplib.SMTPException:
            self._logger.exception('Unable to send email to address "{}"'.format(email))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号