SOLVED, email on vpn activity (connection, disconnection)

Hi and best wishes for new year,
I have a number of vpn clients logging into a pptp vpn server (750G), and would like to have an email (or execute a script), each time one of them connects and/or disconnects from the server, with some basic data of the connection (ip address, secret name).
My vpn clients are on dynamic ips, so there is no easy way to monitor them via the netwatch tool.
How else can I check the activity on my vpn server? It could be so nice, if there were a On connect/on disconnect (or Up/down, like in the netwatch tool) event for each secret to use and put some script on it, then I could send my email thru the script!..
thanks for any hints,
darenGr

add new action with target email
and add ppp logging.

For example pppoe

/system logging action add name=pppoe-email target=email email-to=“you@mail.com
/system logging add action=pppoe-email topics=pppoe

many thanks for reply.
following your advice above, I tested with pptp as topic, but i also get a lot of pptp.debug packets events as well as pptp.ppp.info packets, about 80 per connect/disconnect event.
then I tested with ppp as topic, and i got about the same number of emails. Maybe there is some way to NOT get the debug ones’, and restrict log output to pptp.ppp.info events only?.
I switched my topic to INFO in my log rule, and I am now getting the same entries as in the log screen in winbox, about 7-8 per connect/disconnect, but I am also getting all the rest entries as well (system info, admin login, logouts, etc), which I do not want…
any further suggestions, please?
many thanks,
darenGr

/system logging add action=pppoe-email topics=pppoe,!debug

I learned a lot today, many thanks for help, worked fine!
best regards,
darenGr

Hi to all..
I want to ask something like the first post..

If i have version 6.5 on 751G. The internet are “into” the mikrotik via ppoe dial {brige ether5 to DSL router (DSL router brige mode) }and
I have ONE VPN account ( services:any —profile.. Limits:no )

I would like to have an email (email@mailsite.com) , each time it connects and/or disconnects from the server, with some basic data of the connection (ip address,uptime,router name, secret name,…all vpv information).
step by step if possible.
Thanks very much for your time.