[Help] Save script output to variable and then send to email

Hi guys, I’m having difficulties with saving script output to a variable and then send it to mail

Any help would be appriciated. Thanks

:local mail 
:foreach i in=[/ppp secret find where disabled=yes] do={ :set mail $i [:put  [/ppp secret get $i comment]]}
/tool e-mail send to=xxx@gmail.com subject=("xxx") body=("\n\n" . $mail);

It’s not possible, in 2022 it’s still not possible. Thanks Mikrotik.

@jousedelano doesn’t start pissing off by resurrecting old nonsense arguments.

Is clear than the OP is a dummy programmer for the presence of this:
:set mail $i [:put [/ppp secret get $i comment]]

and you are probably worse off, dear “Business Owner”

Thank you.