Appdaemon mail

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:

https://docs.python.org/3.4/library/email-examples.html

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.