完成项目信息管理的迁移

This commit is contained in:
2025-04-11 14:30:48 +08:00
parent 9e14a3256f
commit 4439687870
41 changed files with 276 additions and 1224 deletions

View File

@ -15,7 +15,6 @@ from typing import List
from redis.asyncio import Redis
from core.exception import CustomException
from utils.cache import Cache
class EmailSender:
@ -32,7 +31,7 @@ class EmailSender:
"""
获取配置信息
"""
web_email = await Cache(self.rd).get_tab_name("web_email", retry)
web_email = []
self.email = web_email.get("email_access")
self.password = web_email.get("email_password")
self.smtp_server = web_email.get("email_server")
@ -84,10 +83,3 @@ class EmailSender:
print('邮件发送失败!错误信息:', e)
return False
# if __name__ == '__main__':
# sender = EmailSender()
# to_emails = ['ktianc2001@163.com', '2445667550@qq.com']
# subject = 'Test email'
# body = 'This is a test email'
# sender.send_email(to_emails, subject, body)