netwatch email script

I have try different email scripts as see at the forum but don’t work

I have routeros 6.12

I want routerboard send me a email if a host is down

How must i setup this.

Simply configure the email tool and test to make sure it is working. Then use netwatch to monitor the host and send the email. How far have you been able to get?

My email setup is done in tools email.
But i want a working script if the host if down.
Thanks for your reply

/tool netwatch
add down-script="/tool e-mail send to=youremail@gmail.com subject=\"Host is D\
    own\" from=youremail@gmail.com port=587 start-tls=yes user=youremail@g\
    mail.com password=`123456 body=\"Host Down\"" host=192.168.88.1 up-script="\
    /tool e-mail send to=youremail@gmail.com subject=\"Host is Up\" from=\
    youremail@gmail.com port=587 start-tls=yes user=youremail@gmail.com passwo\
    rd=123456 body=\"Host Up\""

Hello, rickfrey i don’t need g-mail i send email via port 25
Can you help me?
Thanks for your reply

If you take the above script and enter in your email info, what happens?

No email receive

Then there is something wrong with the email settings you are using or the email service is incompatible with what the MikroTik can do. Why don’t you try to create a Gmail account and test it using the above script. You might also want to verify the settings that email clients should use for your service.

I will try and let you know.

Many thanks to you.

No problem. Hope you get it working :smiley:

Hi all tried the above script but don’t work show error connecting to server on my log is there any other setting i have to so some were?
kind regards

first configure e-mail tool:
/tool e-mail set address=173.194.77.108 port=587 from=RB@MT user=yourmail@gmail.com password=yourpass start-tls=yes

then try to send test mail:
/tool e-mail send to=toyourmail@gmail.com subject=“test” body=“test”

Thanks work perfectly well
kind regard

Glad to hear it!

Hello Marizo,
I am very new to mikrotik, please tell me more regarding this syntax here address=173.194.77.108 from=RB@MT. What are their meaning ? For me to be able to adjust them with my condition here.

Thank you very much
Kadek