def email_verification(email,password):
message = Mail(
from_email='hesheitaliabu@gmail.com',
to_emails=email,
subject='HEY BABYYYYYYYYYYYYYYYYYYY',
html_content=f"""
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<body>
<button onclick="myFunction()">Replace document</button>
<script>
function myFunction() {
window.location.href = "email_verify/" + email + "/" + password;
}
</script>
</body>
</html>
""")
Sg = sendgrid.SendGridAPIClient(api_key=os.environ.get('MyAPI'))
Sg.send(message)
I have define a function called "email_verification" on FLASK to send the email with HTML design. I have used the f-string for the HTML content. But, I get a red curve line under the line of window.location.href = "email_verify/" + email + "/" + password;.