游戏日报 grafana->png sendmail

This commit is contained in:
pengtao 2019-10-31 16:13:46 +08:00
parent c728585682
commit b177dc1ca6

View File

@ -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])