Complete the code to import the Flask mail extension.
from flask_mail import [1]
The Mail class is imported from flask_mail to handle email sending.
Complete the code to create a Flask-Mail message with subject and recipient.
msg = Message(subject='Password Reset', recipients=[[1]])
The recipient list requires email addresses as strings inside a list. Here, a string email is used.
Fix the error in sending the email with Flask-Mail instance named 'mail'.
mail.[1](msg)The correct method to send an email message with Flask-Mail is send().
Fill both blanks to create a token URL for password reset with Flask's url_for.
reset_url = url_for('[1]', token=[2], _external=True)
The endpoint name is usually 'reset_password' and the token parameter is named 'token'.
Fill all three blanks to create a dictionary comprehension filtering users with active status.
active_users = {user.id: user.email for user in users if user.[1] == [2] and user.[3]The dictionary comprehension filters users whose status is 'active' and who are verified (is_verified is True).