It may not seem like the most efficient approach in the World, but depending on the hardware you have, and how you use the hardware, if you're not familiar with it, you might discover that you already have things running in the "background", which check hotplug/removable devices and such, every few seconds, for status changes.
If you were willing to check the ppp link status periodically, you wouldn't necessarily have to accept all the overhead of frequently running a cron
job. instead, you could just write a script which starts at the proper time during the boot sequence, sits in the background, in a loop with a delay, periodically checking ppp link status.
However, the larger issue is, under what circumstances is the ppp link being brought up, when you wish to receive notification email?
For example, in certain circumstances, with some distros., some ppp control can involve calling an ifup
script, which has a provision for calling an optional script after the interface is up, by setting the POST_UP_SCRIPT config. value.
Alternatively, if in your situation, bringing up the link is handled purely by a ppp daemon, but the daemon has a fairly full compliment of switch hooks, init, connect, welcome, disconnect, etc., then you may be able to simply provide the appropriate script, or tie into a script if it already exists.
on your system, may provide you some information specific to your system. If those don't get you any info. you can try:
or if you find that you don't have the apropos
command, this should work: