Yesterday, 14:18
Hi
I would like to try to differentiate between sending emails and text messages based on the tags in the subject that triggers the alarm.
I was thinking of using this code, but I don't know how to pass the group to the email address. I wanted to know if there was a way to assign TAGS to the email address, then compare the matches, add them to the address list, and finally check the various lists. If the length is >0, send emails to the lists, sending for all the lists.
Could this be a solution?
Thank you very much.
I would like to try to differentiate between sending emails and text messages based on the tags in the subject that triggers the alarm.
Code:
for i, tag in ipairs(tags) do
if tag == 'MEC' then
-- ASSEGNO LISTA MAIL DA UTILIZZARE
iddest = emailsMAN
elseif tag == 'ELE' then
iddest = emailsVIS2
-- COMPILARE LISTA MAIL PER CUI ALLARME E ATTIVO
elseif tag == 'TEC' then
iddest = emailsALL
-- COMPILARE LISTA MAIL PER CUI ALLARME E ATTIVO
elseif tag == 'ALL' then
iddest = emailsALL
-- COMPILARE LISTA MAIL PER CUI ALLARME E ATTIVO
else
-- COMPILARE LISTA MAIL PER CUI ALLARME E ATTIVO
end
end
-- verificare indirizzi a cui mandare mail
emails = {}
-- verifico indirizzi per MAIL
if (grp.getvalue('32/1/29') == true) then
maddr= grp.getvalue('32/1/1')Could this be a solution?
Thank you very much.