PHP script do not use FusionPBX settings. It uses shell `mail` command.
So I think if you want use it you have to configure your `mail` application
(have no idea how to do it).
My script uses same mechanism as e.g. VM to email. Also my script send only
one message when gw lost registration and does not repeat it each time when
gw fail register again. Also may be it does not work with `global` gateways.
Any improvments/suggestion are welcome.