54. Mikrotik Email Alert when new user connect to your Hotspot

Here is a Script:

/system script add name="new_user" source={
  :foreach a in [/ip hotspot active find] do={
    :if ([/ip hotspot active get $a uptime]<1m) do={
      /tool e-mail send \
        to=phalla.ccmt@gmail.com \
        subject=("'" . [/ip hotspot active get $a user] . "' logged in") \
        body=("User:" . [/ip hotspot active get $a user] . "  Date:" . \
          [/system clock get time] . "   IP address:" . \
          [/ip hotspot active get $a address] . "  MAC address:" . \
          [/ip hotspot active get $a mac-address] . "  Session timeout:" . \
          [/ip hotspot active get $a session-timeout])
      }
    }
  }

You can contact me: plus.google.com/+PhallaCCMT; youtube.com/phallaccmt; facebook.com/Phalla.CCMT; twitter.com/PhallaCCMT and Phalla.CCMT@gmail.com
Previous
Next Post »

2 comments

Write comments
hasnetakiwa
AUTHOR
June 3, 2017 at 12:20 AM delete

thanks Phalla, i'm try but not working. you can show the youtube video tutorial?

Reply
avatar
hasnetakiwa
AUTHOR
June 3, 2017 at 12:20 AM delete

thanks Phalla, i'm try but not working. you can show the youtube video tutorial?

Reply
avatar