script send uptime my routeros to email

Hi guys, I do not know how to write a script that sends my email uptime routerOS
I know that in the terminal command

Code: Select all
{
:local upTime [/system resource get uptime]
:put $upTime
}

I do not know how to write script to send a value uptime on my email
help me please

First you should configure your email:
http://wiki.mikrotik.com/wiki/Manual:Tools/email

Then use script, you can also add any other information or file to this script…
{
:local uptime [/system resource get uptime];
/tool e-mail send to=“xxxxxxxx@xxxxx.com” subject=“Some text” body=“$uptime” start-tls=yes;
}

Thank you for the support from you
I did so
{
:local uptime [/system resource get uptime];
:local date [/system clock get date];
:local time [/system clock get time];
:local identity [/system identity get name];
/tool e-mail send to=“xxx@xxx.xx” subject=“$identity, $date, $time, Uptime: $uptime” body=“Date: $date, Time: $time\n\n$identity, UpTime: $uptime” start-tls=yes;
}