游戏日报 grafana->png sendmail

This commit is contained in:
pengtao 2019-10-31 16:10:55 +08:00
parent e8478d97d6
commit 8c70aae3c0
2 changed files with 3 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

View File

@ -4,10 +4,10 @@ from flask_mail import Mail, Message
import os
from threading import Thread
PEOPLE_FOLDER = os.path.abspath('.')
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'
@ -35,7 +35,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])