我有一个烧瓶应用程序,我想在其中发送一封电子邮件,以及从表单中获取的一些数据。一切正常,但问题是,当收到电子邮件时,没有呈现 HTML 代码,它只显示原始代码。这是我到目前为止所做的
if google_response['success']: #this line is used for a ReCaptcha response
msg = Message('Thank you for contacting me', sender='(my email address is put here as a string)', recipients=[request.form['email']])
name = request.form['name']
msg.body = render_template('email.html', name=name)
mail.send(msg)
return render_template('index.html')
else:
return render_template('index.html')
我究竟做错了什么?