The ability to send emails is usually one of the most basic functions of any web application. It is usually easy to implement with any application. With Python-based applications, it is quite simple to implement with the help of smtplib. In the case of Flask, this is further simplified by an extension called Flask-Mail.
Implementing email support for Flask applications
Getting ready
Flask-Mail can be easily installed via pip:
$ pip3 install Flask-Mail
Let's look at a simple case where an email will be sent to a catalog manager in the application whenever a new category is added.