游戏日报 grafana->png sendmail
This commit is contained in:
parent
e8478d97d6
commit
8c70aae3c0
BIN
daily_report/static/images/img2019-10-31.png
Normal file
BIN
daily_report/static/images/img2019-10-31.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 192 KiB |
@ -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])
|
||||
|
Loading…
x
Reference in New Issue
Block a user