Community discussions

MikroTik App
 
tiago15
just joined
Topic Author
Posts: 24
Joined: Mon Aug 31, 2020 3:03 pm

Script doesn't works

Mon Aug 31, 2020 9:55 pm

Hello everyone, I am trying to get mikrotik to send me a warning email through a script and it does not work, the email configuration is well configured because if I put the commands through the console, the emails do arrive, but if I run the script it does not work.
Can you help me? Thank you.

tool e-mail send to=xxxx@yyyy.com
subject = Hello_caracola
body = This_mail_is_informative


Any idea? regards.
 
User avatar
FiiMitch
newbie
Posts: 35
Joined: Tue Aug 18, 2020 8:49 am
Location: Gold Coast, QLD
Contact:

Re: Script doesn't works

Tue Sep 01, 2020 2:22 am

Run the script using terminal and it should tell you where exactly in the script it is failing.

To do this:
/system script run [/system script find name="YourScriptHere"]

It will most likely output something like "error on line 5 column 12" or similar. Guessing it's the spaces around your "=" symbols.
Last edited by FiiMitch on Tue Sep 01, 2020 4:25 am, edited 2 times in total.
 
User avatar
inteq
Member
Member
Posts: 430
Joined: Wed Feb 25, 2015 8:15 pm
Location: Romania

Re: Script doesn't works

Tue Sep 01, 2020 3:04 am

/tool e-mail send to=me@server.com subject="Something" body="Blahblah";
 
User avatar
FiiMitch
newbie
Posts: 35
Joined: Tue Aug 18, 2020 8:49 am
Location: Gold Coast, QLD
Contact:

Re: Script doesn't works

Tue Sep 01, 2020 4:23 am

/tool e-mail send to=me@server.com subject="Something" body="Blahblah";

Give a man a fish and he will eat for a day.

Teach a man to fish and he will eat for a lifetime.
 
tiago15
just joined
Topic Author
Posts: 24
Joined: Mon Aug 31, 2020 3:03 pm

Re: Script doesn't works

Tue Sep 01, 2020 10:10 am

/tool e-mail send to=me@server.com subject="Something" body="Blahblah";
Now is working the quotes were missing, Regards!!