Script help required to email all Interface IPS

Hi I´m hoping someone can help me with a script I am trying to write.

I´m trying to get a script to email all the IP addresses of the router interfaces to me. I´m a bit out of my depth with this. Thanks.

This is what I have tried but it´s just not working:

:global strSystemName [/system identity get name]
:local text;
:local item;
:foreach i in=[/ip address] do={
:set item ([/ip get $i address]);
:set text ($text . $item);
:set text ($text . “\n”);
};

/tool e-mail send to=t@t.com subject=“IP Addresses” body “$strSystemName $text”

Never mind,

I figured it out.