Customize emails
This commit is contained in:
parent
14e97f1be3
commit
ff02735055
12
papi/main.py
12
papi/main.py
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue