mycontroller-org / mycontroller-v1-legacy

The Open Source Controller
http://www.MyController.org
Apache License 2.0
147 stars 90 forks source link

On email sending failure specify how long to retry how often #348

Open RURon opened 7 years ago

RURon commented 7 years ago

I set up a trigger to send me an email when a node's battery level drops below a certain level. This works nicely thanks to your script.

Unfortunately if the SMTP server is not working that is configured to be used to send the mail, I wonder how mycontroller actually behaves then. Currently I see lot's of exceptions in the server log around the time the trigger started the email script, but obiously there is no longer retrying to resend that mail.

It would be great if one could specify to retry for example every 15 minutes upto 24 hours (or so) to send a failed mail again...

Over here I sometimes switch off my internet router at night and then mycontroller obviously can't connect to any SMTP server...

RURon commented 7 years ago

Come to think of it I could of course run a local SMTP server on the Raspberry and let it handle the mail forwarding to the internet as well...

jkandasa commented 7 years ago

@RURon Yes, this will be useful. I will try to address this by creating a queue for emails.