Open mlgold opened 3 years ago
Goo idea. I use a similar gmail-based notifier and it works like a charm for email and sms
I would accept a PR to add this as a notifier option. Ideally though we would overhaul the notifier setup first, such as to add some common framework.
I agree, an overhaul of the notifier setup would be a good idea. Since this issue was raised, I added playing a loud sound on the computer it is running on, which is in my family room. The notifications take seconds to a minute or two to arrive and in that time the campsite is gone. The sound plays immediately. I also have a cron job that sets the path and tries two more times to run camping.py if it fails. So, ideally, a cron script, an updated camping.py and a more generic notifier would be good.
This is a simple email notifier using swaks. It requires an account and smtp server that can be used to send emails.
I believe if you want to use gmail to send emails this auth method will not work, so I left the json import at the top of the notifier for future use with a more secure authorization.
The example below sends to both an email and sms. Android Gmail now only appears to allow a different notification sound based in sms messages. The notification sound based on email labels no longer seems to be available.
It is quick and dirty. There is no checking if swaks succeded.