整理项目结构,优化配置项

This commit is contained in:
2024-07-12 13:51:47 +08:00
parent 0f672c7961
commit ab15cb1fc3
33 changed files with 275 additions and 506 deletions

View File

@@ -0,0 +1,15 @@
# 程序异常短信配置
ERROR_EMAIL_CONFIG = {
# SMTP服务器地址
"smtp_server": "smtp.163.com",
# 连接SMTP的端口
"port": 994,
# 发件人邮箱地址请确保开启了SMTP邮件服务
"sender": "EchoLiu618@163.com",
# 授权码--用于登录第三方邮件客户端的专用密码,不是邮箱密码
"authorization_code": "OKPQLIIVLVGRZYVH",
# 收件人邮箱地址
"receivers": ["1515783401@qq.com"],
# 尝试次数
"retry_times": 3,
}

View File

@@ -3,7 +3,7 @@ import logging
import smtplib
from email.mime.text import MIMEText
from config.email import ERROR_EMAIL_CONFIG
from auto_email import ERROR_EMAIL_CONFIG
def send_error_email(program_name, error_name, error_detail):