I was struggling a bit with scheduling in Flask. If you are looking for a job to run on a schedule, e.g. send an email every 1 hour or something like that, then I found this tutorial very informative.
Alternatively, if it is based on user actions e.g. if a user presses a button then send an email. I would suggest using the Dash Callbacks which call a function that sends an email.
It’s hard to say exactly what is the best solution without more information about what exactly you are trying to achieve and to be able to see a code example.