How to Solve NameError: name 'Mail' is not defined -- flask_mail

Solution: Import the 'Mail' module

# Add the following line to the top of your code
from flask_mail import Mail

 

For more information:
flask_mail Mail