I'm using the python framework, Flask, to send a HTML email with the following code:
HTML Email:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Email</title>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph</p>
</body>
</html>
Flask (using Flask-Mail):
html = render_template('email/activate.html', confirmURL=confirmURL)
msg = Message('Please confirm your email', sender='email@gmail.com', recipients=[email])
msg.body = html
mail.send(msg)
I kept it basic to test if the email was appearing correctly or not. I sent the email to a Gmail and an Outlook account but both seem to appear the HTML as just plain text. I've tried using different HTML snippets and the same result occurs. I'm not sure if it is a problem with my code, my email accounts or Flask.
Thanks in advance.