in reply to how can this be improved?
Not bad. One "error" I can see: you're not checking the return code from sendmail (which will be available in $? after the close).
I would also strongly consider making a new module for "raising alert messages" for your system, so that if later on you decide that sending an email when there's a problem get unmanagable, you can get it to post it to your favourite error processing tool by changing your system in one place. Another approach is to raise a critical event to the system log with something like Sys::Syslog, and use a program like xlogmaster to catch them after that.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: how can this be improved?
by blueflashlight (Pilgrim) on Aug 21, 2001 at 21:55 UTC |