i have tryed this script in system>script and run it manually but it don't work and i don't know why ....
if i try to put it in the terminal .. it reply to me with this error
[admin@MikroTik] > # Note: The SMS is removed from the inbox after being sent to Email, #
[admin@MikroTik] > # even if the Email fails to be sent #
[admin@MikroTik] > # Remember to set up /Tools/SMS with the USB port of your #
[admin@MikroTik] > # Modem and the info channel. Put anything in secret and #
[admin@MikroTik] > # make sure Receive Enabled is ticked #
[admin@MikroTik] > # Tested on Rb751U RouterOS v5.12 with Huawei E367 #
[admin@MikroTik] > # Peter James 2012-04-04 #
[admin@MikroTik] >
[admin@MikroTik] >
[admin@MikroTik] > :local EmailAddress "
info@techdigital.it";
[admin@MikroTik] > :local smsPhone;
[admin@MikroTik] > :local smsTimeStamp;
[admin@MikroTik] > :local smsMessage;
[admin@MikroTik] > :local smsContent;
[admin@MikroTik] >
[admin@MikroTik] > # Get System Identity #
[admin@MikroTik] > :local SystemID [/system identity get name];
[admin@MikroTik] >
[admin@MikroTik] > :log info "SMS to Email script started";
[admin@MikroTik] >
[admin@MikroTik] > # Set Receive Enabled, in case it was cleared by a router reboot #
[admin@MikroTik] > /tool sms set receive-enabled=yes;
[admin@MikroTik] >
[admin@MikroTik] > delay 2;
[admin@MikroTik] >
[admin@MikroTik] > # loop through all the messages in the inbox #
[admin@MikroTik] > :foreach i in=[/tool sms inbox find] do={
{...
{... :set smsPhone [/tool sms inbox get $i phone];
expected variable name (line 3 column 6)
[admin@MikroTik] > :set smsTimeStamp [/tool sms inbox get $i timestamp];
expected variable name (line 1 column 6)
[admin@MikroTik] > :set smsMessage [/tool sms inbox get $i message];
expected variable name (line 1 column 6)
[admin@MikroTik] >
[admin@MikroTik] > :set smsContent "Router ID: $SystemID\nSMS Received from: $smsPhone\nDate&Time: $smsTimeStamp\nMessage: $smsMessage";
expected variable name (line 1 column 6)
[admin@MikroTik] >
[admin@MikroTik] > :log info $smsContent;
syntax error (line 1 column 12)
[admin@MikroTik] >
[admin@MikroTik] > /tool e-mail send subject="$SystemID GSM Modem SMS Received" to=$EmailAddress body="$smsContent";
expected end of command (line 1 column 28)
[admin@MikroTik] >
[admin@MikroTik] > # Now remove the SMS from the inbox #
[admin@MikroTik] > /tool sms inbox remove $i;
syntax error (line 1 column 25)
[admin@MikroTik] >
[admin@MikroTik] > delay 10;
[admin@MikroTik] >
[admin@MikroTik] > }
[admin@MikroTik] >
[admin@MikroTik] > # clear Receive Enabled, so info channel can be used by other scripts #
[admin@MikroTik] >
[admin@MikroTik] > :log info "SMS to Email script complete";
[admin@MikroTik] >
how i can resolve that??
sorry for my english but i'm not english