Email when primary gateway fails

I have two gateways.

Primary is PPPOE bridged
Secondary is DHCP assigned

Failover is working perfectly but because mikrotik is so seemless at handling this the connection could be down for weeks and I wouldnt know.

How can I tell the mikrotik to email me when the primary connection is down. Also email again when the connection is restored.

Thanks

Make use of netwatch. Create a routing rule to force traffic to a certain host to always use a dedicated gateway and let netwatch check the remote system.
E.g.
Force traffic to 8.8.8.8 over pppoe and when 8.8.8.8 is unreachable, pppoe is down. In netwatch specify what to do when up/down.