diff --git a/auto_email/error_email.py b/auto_email/error_email.py index dab8566..2f682dd 100644 --- a/auto_email/error_email.py +++ b/auto_email/error_email.py @@ -67,6 +67,7 @@ def send_error_email(program_name, error_name, error_detail): mail.sendmail(sender, receivers, massage.as_string()) # 发送邮件 mail.quit() logging.info("成功发送了一封邮件到" + receivers_str) + break except smtplib.SMTPException: if i == retry_times - 1: logging.warning("邮件发送失败!")