Automatically send email notifications with Mikrotik router

NC

In this article, I will show you how to configure automatic sending of email alerts with mikrotik router.

Configure email sending from mikrotik router

Go to "Tools" > "Email"

How to automatically send email notifications with Mikrotik router

Because we use Gmail email to send in the following settings, Fill in your Gmail email and password, Do try to send an email click "Send Email".

How to automatically send email notifications with Mikrotik router

How to automatically send email notifications with Mikrotik router

Next, Go to your Google account. On the left navigation panel click "Security". In a less secure app access panel, Click "turn on access".

How to automatically send email notifications with Mikrotik router

How to automatically send email notifications with Mikrotik router

Check email inbox sent by mikrotik email. If the incoming email means the configuration is correct. So you have configured sending email from router mikrotik.

How to automatically send email notifications with Mikrotik router

Configure Netwatch

Go to "Tools" > "Netwatch".

How to automatically send email notifications with Mikrotik router

Netwatch monitor state of hosts on the network. It does so by sending icmp pings to the list of specified IP addresses. We will use netwatch to send email every time the server changes state.

Host: Enter the IP address of the desired destination in this field.

How to automatically send email notifications with Mikrotik router

Next configure email sending in case the server is up or down. You can copy the code here:

:log error "Server is up again"

/tool e-mail send to="[email protected]" subject="Server is up on $[/system clock get time]"


:log error "Server is down"

/tool e-mail send to="[email protected]" subject="Server is down $[/system clock get time]"

How to automatically send email notifications with Mikrotik router

After the configuration is complete, we will see the results. Every time the server changes from up to down state or vice versa, it sends a notification to your email. In addition, there is also information about the time.

How to automatically send email notifications with Mikrotik router

Facebook: https://www.facebook.com/routerbest

Twitter: https://twitter.com/routerbestcom

Tags: Gmail Mikrotik