12-15-2003, 11:24 AM | #1 (permalink) |
Junkie
Location: RI
|
Perl+Sendmail question
Currently, I'm running a mud, and I just started to use a Perl script to make sure that my mud is running. Is there a way in the perl script to mail me whenever the mud needs to be rebooted? My host is currently using sendmail also.
The Perl code is being used on a Slackware comp, with Perl 5.8.0 Thanks in advance. |
12-15-2003, 12:10 PM | #2 (permalink) |
Darth Papa
Location: Yonder
|
no prob.
Code:
$sendmail = '/path/to/sendmail'; open (MAIL, "| $sendmail -t") || die "sendmail failed $!"; print MAIL "To: whoever\@wherever.com\n"; print MAIL "Subject: mud's broke!\n\n"; print MAIL "Mud's broke. Fix it!\n"; close MAIL; What this won't do is monitor the mud. That's a different script entirely. |
Tags |
perl, question, sendmail |
|
|