Email notification - device connected to wifi

Hi,

is there any way to configure a script that notifies by email when a particular device connects to the wifi network?
I managed to configure a script for DHCP, but there the notification is sent every time the lease refreshes:

:if ($leaseBound = 1) do={

I have the lease time set to 10 minutes, so I get a notification every 10 minutes if a device is connected to the network.

Information about such connection appears in the log as far as I can see. Is it possible to make System script, which detects it and generates notification?

Yes, you can make a script that reads the log. Unfortunately you cannot just call a script whenever a log entry is added, so you need to schedule a script to run every minute or so, and read the memory log.
When you want to avoid duplicates, you can store values in a global variable (e.g. an array or string) and suppress sending the mail when the corresponding entry already is in the global variable.