From b177dc1ca65abf4a44e50f84261a40e6688c6922 Mon Sep 17 00:00:00 2001 From: pengtao Date: Thu, 31 Oct 2019 16:13:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E6=97=A5=E6=8A=A5=20grafana-?= =?UTF-8?q?>png=20sendmail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- daily_report/test_report.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/daily_report/test_report.py b/daily_report/test_report.py index 7d73032..4593687 100644 --- a/daily_report/test_report.py +++ b/daily_report/test_report.py @@ -9,7 +9,6 @@ PEOPLE_FOLDER = os.path.join('static', 'images') app = Flask(__name__) app.config['UPLOAD_FOLDER'] = PEOPLE_FOLDER sender = "ops@kingsome.cn" -app = Flask(__name__) app.config['MAIL_SERVER'] = 'smtp.exmail.qq.com' app.config['MAIL_PORT'] = '465' app.config['MAIL_USE_SSL'] = True @@ -35,7 +34,7 @@ def show_index(): msg = Message(title, sender=sender, recipients=recipients) msg.subject = f"test_游戏日报" - full_filename = os.path.join(PEOPLE_FOLDER, 'img2019-10-31.png') + full_filename = os.path.join(app.config['UPLOAD_FOLDER'], 'img2019-10-31.png') msg.html = render_template('index.html', user_image=full_filename) thread = Thread(target=send_async_email, args=[app, msg])