Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 推送系bug #26

Merged
merged 3 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions interface/CLI/setting.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __init__(self, conf: Config):
"smtp_mail_user": "",
"smtp_mail_pass": "",
"smtp_sender": "",
"smtp_receiver": "",
"smtp_receiver": [],
},
},
# 开发者
Expand Down Expand Up @@ -147,7 +147,7 @@ def NoticeStep() -> tuple[bool, bool, bool, str]:
"mail_user": "",
"mail_pass": "",
"sender": "",
"receiver": "",
"receiver": [],
},
}
select = self.data.Inquire(
Expand All @@ -166,6 +166,8 @@ def NoticeStep() -> tuple[bool, bool, bool, str]:
default=["系统提醒", "音频提醒"],
)
for i in select:
if i=="smtp":
continue
dist[i] = True

if "pushplus" in select:
Expand Down Expand Up @@ -231,14 +233,14 @@ def NoticeStep() -> tuple[bool, bool, bool, str]:
)
smtp_receivers = self.data.Inquire(
type="Text",
message="请输入收件人邮箱,可群发,按照['[email protected]','[email protected]']格式输入",
message="请输入收件人邮箱,可群发,按照'[email protected]','[email protected]'格式输入",
default="",
)
dist["smtp"]["mail_host"] = host
dist["smtp"]["mail_user"] = user
dist["smtp"]["mail_pass"] = passwd
dist["smtp"]["sender"] = smtp_sender
dist["smtp"]["receivers"] = smtp_receivers
dist["smtp"]["receiver"] = list(smtp_receivers.split(","))

return dist

Expand Down
3 changes: 2 additions & 1 deletion util/Notice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ def PushPlus(self, token: str) -> None:
"template": "html",
"channel": "wechat",
}

self.net.Response(method="post", url=url, params=data, isJson=False)

@logger.catch
Expand Down Expand Up @@ -161,7 +162,7 @@ def Mail(self, params: dict) -> None:
# 邮件发送方邮箱地址
sender = params["sender"]
# 邮件接受方邮箱地址,注意需要[]包裹,这意味`着你可以写多个邮件地址群发
receivers = params["receivers"]
receivers = params["receiver"]

# 设置email信息
# 邮件内容设置
Expand Down
Loading