#read log
:local logcontent
:foreach int in=[/log find ] do={
:set logcontent ("$logcontent\r\n" .[/log get $int time]. " - " .[/log get $int message])
}
#send email
/tool e-mail send to="tujuanemail@gmail.com" from="asalemail@gmail.com" subject=([/system identity get name] . " Log " . [/system clock get date]) body=$logcontent server=74.125.68.108
#delete old log
/system logging action set memory memory-lines=1
/system logging action set memory memory-lines=1000
:log info "email log sent"
System > script
edit tools>email
server: server kita
port : 587
Start TLS : yes
From : email@emailkita
User : email@emailkita
Password : passwrd email kita
Bagikan