netwatch script compose email to multiple recipients?

Hello I’m trying to alter our existing netwatch on down event script to simply send an email to 5 recipients.
I’ve tried using a comma and or semi colon to separate each recipient.
Im using ROS v 3.30 Here’s my existing script code copied from netwatch down event window in winbox.

/tool e-mail send
to=abc@mycompany.com, michael
.manns@gmail.com
from=KCMT@foresitewireless.com \ subject=(“Room 206 AP is down”) \

The first email address i altered to prevent webcrawlers from adding our support email.
the second email address is my personal account which im using strictly for testing.

When I try either email addresses by themselves it works by when i try adding any extra recipients it stops sending period.
I’m sure there is probably some syntax I’m missing for this to work .
Community please advise

Did you try this?

/tool e-mail send \
to=abc@mycompany.com \
from=KCMT@foresitewireless.com \
subject=("Room 206 AP is down")

/tool e-mail send \
to=michael.manns@myemailserver.com \
from=KCMT@foresitewireless.com \
subject=("Room 206 AP is down")

ADD: Edited for the spambots.

that works too bad no way to consolidate but if it works sweet.
thanks surfer tim i guess i really should try to Keep It Simple Stupid

Here is a more expandable / flexible approach you could try:

:local recipients { "abc@mycompany.com", \
                         "michael.manns@gmail.com", \
                         "another.email@domain.com" }

:local subject "Room 206 AP is down"

:foreach r in=[:toarray $recipients] do={
   :put ("Sending email to " . [:tostr $r])
   /tool e-mail send to=[:tostr $r] subject=[:tostr $subject]
}

As you need to add more recipients, just add their email to the list. Also, in the case of v4.6 where the tls= parameter changed, this allows you to maintain a single ‘/tool e-mail’ command syntax instead of many, making updates to the script very easy.

Hope this helps, just a bit of programming advise.

thank you for the info, Time for me to dissect the code you provided to try to understand the inner workings.
I’m driven to learn mikrotik api/scripting.

:local from "KCMT@foresitewireless.com"
:local recipients "\
abc@mycompany.com,\
michael.manns@gmail.com";
:local subject "$[/system identity get name] - Room 206 AP is down"
:local body "$subject\r\n"


:foreach r in=[:toarray $recipients] do={
:log info ("Sending email to $[/system clock get time] " . [tostr $r]);
/tool e-mail send to=[:tostr $r] from="$from" subject="$subject" body="$body";
};

Simply use cc… That accepts several receipients.

/tool e-mail send \
to=abc@mycompany.com \
cc=michael.manns@gmail.com,another@gmail.com \
from=KCMT@foresitewireless.com \
 subject=("Room 206 AP is down")

Smart workaround.

Why you can add multiple recipients for for CC and TO is strange. In normal email you can send to as meny TO users you like.
Also you need at list on TO user, also strange. Only CC should be enough as well.
Here MT has some work to do.