From 85160cc125e1232ed74e35d5652a0714d78dfbcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9F=B3=E7=A5=9E?= <3162475700@qq.com> Date: Wed, 3 Jul 2024 12:23:13 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=93=E6=8C=81=E7=BB=AD=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E4=BF=AE=E5=A4=8D=EF=BC=8C=E7=A1=AE=E4=BF=9D=E6=AD=A3?= =?UTF-8?q?=E5=B8=B8=E8=BF=90=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- run.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/run.py b/run.py index ae1ffa1..0d3966d 100644 --- a/run.py +++ b/run.py @@ -54,15 +54,15 @@ if config["rss_subscribe"]["enable"]: if latest_articles == None: print("没有新文章") else: - send_emails( - emails=email_list["email"], - sender_email=email, - smtp_server=server, - port=port, - password=password, - subject="最新文章推送", - body="最新文章为:\n" + "\n".join([article["title"] + " " + article["link"] for article in latest_articles]), - use_tls=use_tls - ) - - + # 循环latest_articles,发送邮件 + for article in latest_articles: + send_emails( + emails=email_list, + sender_email=email, + smtp_server=server, + port=port, + password=password, + subject="清羽飞扬の最新文章:" + article["title"], + body="文章链接:" + article["link"] + "\n" + "文章内容:" + article["summary"] + "\n" + "发布时间:" + article["published"], + use_tls=use_tls + ) \ No newline at end of file