chore(config): 新增注释,更改默认发信配置

This commit is contained in:
ClovertaTheTrilobita 2025-11-27 21:41:53 +00:00
parent 3bed8a7eb9
commit 63340ae398
2 changed files with 4 additions and 4 deletions

View file

@ -20,14 +20,14 @@ bot:
# 如果你需要启用此邮箱,请将该邮箱下的 enabled 字段修改为 'True' # 如果你需要启用此邮箱,请将该邮箱下的 enabled 字段修改为 'True'
# 请至少启用一个邮箱若三个邮箱均启用则优先级为gmail > qq邮箱 > 自建邮箱 (按照此配置文件中的顺序) # 请至少启用一个邮箱若三个邮箱均启用则优先级为gmail > qq邮箱 > 自建邮箱 (按照此配置文件中的顺序)
mail: mail:
google: google: #gmail
enabled: 'False' enabled: 'False'
smtp_server: 'smtp.gmail.com' smtp_server: 'smtp.gmail.com'
email: 'xxxxxx@gmail.com' email: 'xxxxxx@gmail.com'
password: '1234567891234567' # 16 位应用码 password: '1234567891234567' # 16 位应用码
qq: qq: # qq邮箱
enabled: 'True' enabled: 'False' # 请至少启用一个邮箱
smtp_server: 'smtp.qq.com' smtp_server: 'smtp.qq.com'
email: 'xxxxxxxx@qq.com' email: 'xxxxxxxx@qq.com'
password: '1234567891234567' # qq邮箱应用码 password: '1234567891234567' # qq邮箱应用码

View file

@ -37,7 +37,7 @@ async def jm_email(album_id: str| None,receiver_email: str| None):
send_status = await send_email_by_server(receiver_email,zip_path) send_status = await send_email_by_server(receiver_email,zip_path)
else: else:
logger.error("您未启用任何一个发信服务,请前往 config.yaml 修改。") logger.error("您未启用任何一个发信服务,请前往 config.yaml 修改。")
send_status = False return "管理员未配置邮箱,发送失败了喵,大哥哥真是杂鱼♥️"
if send_status: if send_status:
# 删除文件 # 删除文件