Confused on how to use Flask-Mail to send automated emails?

I am currently trying to build a website, my website should fucntion like this:

A person opens my website has a form that asks the person to enter their email and the amount of raffles to generate and then redirects the person to a success page and then can view all details specified in the form, and me has the host can see actual database in my pc, the probelm is im not to sure how to send the raffles to the emails specifed in the form, I followed this link but I’m not sure how I can use those codes to my requirements.

Here is a video link that shows how my website is functioning and this is the link to the preview of my work so far. https ://


You should check out Miguel Grinberg’s Mega Flask Tutorial, there is an email section which has more information and guides you through setting up email sending with Flask.

Hope this helps.