Is there any example how to send a mail based on a dynamic template? Right now I call a script in home assistant. But in this case the list of recipients and the attachment setting is fixed.
AppDaemon is just python so you can do whatever you want in an app.
A quick Google revealed smtplib that might do what you want:
ok how can we use the Jinja2 from appdaemon?
Import the library and code what you need, just like in any other python script - there is nothing special about the python in AppDaemon apart form the factit is automatically loaded and has access to Home Assistant through it’s api - and even that part is optional.