Customize emails

This commit is contained in:
Colin Goutte 2021-10-20 12:28:58 +02:00
parent 14e97f1be3
commit ff02735055
1 changed files with 9 additions and 3 deletions

View File

@ -278,9 +278,15 @@ def post_sonde_data(
html = res.body.decode("utf-8")
from papi.mail_sendermodel import sendmail
cond = False
if cond:
sendmail(html)
conf = PROBES[idsonde]
sumup = utils.sample2statuscount(present)
subject = " ; ".join(sumup)
sendmail(
htmlpart=html,
emails=conf["emails"],
subject=subject,
)
return {
"count": len(mesures_)
if "date" in mesures_[0].content.keys()