update: save instead of deleting drafts

This commit is contained in:
2025-08-22 11:24:52 +08:00
parent b2aad59093
commit 69fe47b19b

View File

@@ -362,13 +362,11 @@ def main(driver: WebDriver):
while mails := driver.find_elements(By.CSS_SELECTOR, "div.io-ox-mail-compose-window"):
try:
# 关闭过期邮件
click("button[data-action='close']", parent=mails[0])
# 删除过期邮件
click("div.modal-footer button[data-action='delete']")
click("div.modal-footer button[data-action='savedraft']")
except Exception as e:
print(f"[警告] 关闭邮件时发生了错误:{e}")
continue
break
if attempt < args.retry:
continue