Code: Select all
add name=backup policy=ftp,reboot,read,write,policy,test,winbox,password,sniff source=":log info \"backup beginning now\"\r\
\n:global backupfile ([/system identity get name] . \"-\" . [/system clock get time])\r\
\n/system backup save name=\$backupfile\r\
\n:log info \"backup pausing for 15s\"\r\
\n:delay 15s\r\
\n:log info \"backup being emailed\"\r\
\n/tool e-mail send tls=yes to=\"xxx@gmail.com\" subject=([/system identity get name] . \\\r\
\n\" Backup\") from=ROUTER@mt.com file=\$backupfile server=xx.xx.xx.xx\r\
\n:log info \"backup finished\""
When I run the script it create a backup file but it doesn't send e-mail. It said Error sending mail: error connecting to server. What am I doing wrong and what am I missing? ROS is 4.17.
Can anyone help me?