解决异常短信重复发送问题

This commit is contained in:
2024-07-20 16:54:43 +08:00
parent d7ad7380a5
commit 39c20a1f36

View File

@@ -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("邮件发送失败!")