I’m working on a Lua script triggered by the Event Juggler to manage some data logs but also send an email. I have had success with a shell script calling ‘sendmail’ but was wondering if there is an equivalent for Lua? Is it possible to retrieve the configured recipient details instead of embedding those details in the Lua script?
If I understood you correctly, then you can retrieve the configured recipient’s email via uci commands, more specifically uci show | grep <part of your email, for example "gmail">
Unfortunately, but I don’t have any experience with LUA scripting and/or programming, as its out of our technical support scope, so I’m not really able to help you out that much.
Yes, you understood me correctly, that will do the trick for me so that I can automatically grab the configuration and use it within my Lua script to populate the required fields. I must have forgotten about this simple way of retrieving configurations.
Thanks for pointing me in the correct direction with enough for me to figure it out with some additional learning.