Email Multi destination address - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Email Multi destination address (/showthread.php?tid=2743) |
Email Multi destination address - Frank68 - 23.07.2020 Hi I test and woks fine the mail for send alarm , is possible send email more to one address in the same time ? Best regards Thank's RE: Email Multi destination address - Erwin van der Zwart - 23.07.2020 Hi, Try: to = {"recipient1@mail.com","recipient2@mail.com","recipient3@mail.com"} BR, Erwin RE: Email Multi destination address - Frank68 - 24.07.2020 (23.07.2020, 16:19)Erwin van der Zwart Wrote: Hi,I have tested but not work , for one dest work I use this for send mail -- INDICAZIONI COMUNI -- get current data as table now = os.date('*t') TS=' del '..now.day..'/'..now.month..'/'..now.year..' alle '..now.hour..':'..now.min..':'..now.sec Dest ='claudio@ciemme.com' value_01 =grp.getvalue('32/1/58') if (first_loop == 1) then if (value_01 ~= last_01) and (value_01 == true) then subject = 'ON ALM' message = 'ON MESSAGE' .. TS mail(Dest, subject, message) alert(message) elseif (value_01 ~= last_01) and (value_01 == false) then subject = 'OFF ALM' message = 'OFF MESSAGE' .. TS mail(Dest, subject, message) end end last_01=value_01 first_loop = 1 tank's in advantage RE: Email Multi destination address - fleeceable - 28.07.2020 I'm using script like this and it works even if one of the emails are empty. Code: alarm = grp.getvalue('10/0/31') RE: Email Multi destination address - Erwin van der Zwart - 28.07.2020 Hi, Here is a improved version of your script, sorry i couldn't ignore if else then's (: It also performs a regex on your mail addresses to be sure they are valid. (~="" does not say anything) Code: alarm = grp.getvalue('10/0/31') Erwin RE: Email Multi destination address - admin - 28.07.2020 @Erwin this regexp does not handle domain part with multiple dots like .co.uk, it also does not handle valid characters like hyphens and underscores. RE: Email Multi destination address - Erwin van der Zwart - 29.07.2020 (28.07.2020, 15:09)admin Wrote: @Erwin this regexp does not handle domain part with multiple dots like .co.uk, it also does not handle valid characters like hyphens and underscores. Thanks! Updated (: |