Hi i would like to compile a email with a script which will automatically add the persons user name in usermanager but seem to have trouble with it. The script runs but the email ends up with a blank usernam. please check below.
/tool user-manager user
:foreach i in=[/tool user-manager user find subscriber="admin"] do={
:set nick [get $i user-name]
:set total [get $i transfer-limit]
:set name [get $i first-name]
:set surname [get $i last-name]
:set comment [get $i comment]
:set bytesin [get $i download-used]
:set bytesout [get $i upload-used]
:set bytestotal ($bytesin + $bytesout)
:set email [get $i email]
:set megstotal ($bytestotal / 1000000)
:set totalcap ($total /1000000)
/tool e-mail send to=$email from=NoReply@isp.com server=$server subject="Usage Warning for $name $surname" body="Usage Notification for $name $surname
Usage: $megstotal
Cap: $totalcap
Username: $nick
Percentage: $percentage%"}
Also tried
:set nick [get $i username]