153. Mikrotik Email alert When new hotspot user Login / Logout


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

Login Script:

#Email Config
/tool e-mail
set address=smtp.gmail.com from=alertphalla@gmail.com password=abce1234 port=587 start-tls=yes user=alertphalla@gmail.com

:local EmailAddress "phalla.ccmt@gmail.com"
:local EmailCC "alertphalla@gmail.com"
:local NUser $user
:local GDate [/system clock get date]
:local GTime [:pick [/system clock get time] 0 8]

/tool e-mail send to="$EmailAddress" cc="$EmailCC"  subject="Hotspot New User $NUser Login at $GTime" body="Your Hotspot is login by new user with account name $NUser and ip address $address on $GDate at $GTime."

:log info "Login"



Logout Script:

#Email Config
/tool e-mail
set address=smtp.gmail.com from=alertphalla@gmail.com password=abce1234 port=587 start-tls=yes user=alertphalla@gmail.com


:local GDate [/system clock get date]
:local GTime [:pick [/system clock get time] 0 8]
:local EmailAddress "phalla.ccmt@gmail.com"
:local EmailCC "alertphalla@gmail.com"
:local NUser $user

/tool e-mail send to="$EmailAddress" cc="$EmailCC"  subject="Hotspot User $NUser Logout at $GTime" body="The user with account name $NUser and ip address $address is logouted on $GDate at $GTime."

:log info "Logout"


Previous
Next Post »

1 comments:

Write comments
Fahad
AUTHOR
August 16, 2019 at 2:35 PM delete

HI bro bro its not working please give me it details i also check your video but not working this script

Reply
avatar