Random Project

modern versions of Net::SMTP need removed

In my systems which run Debian Wheezy I needed to remove the
at the end of the datasend lines i.e.

$smtp->datasend(“To: $mailto”);
$smtp->datasend(“From: $mailfrom”);
$smtp->datasend(“Subject: $mailsubject”);
$smtp->datasend(”
“);

so that the headers acually are taken as headers.

I also set the subject as:
# $mailsubject = “Nagios Monitoring Alert: $opt_h is $opt_s”;
$mailsubject = “$opt_n: $opt_h $opt_D is $opt_s”;

which maximises the information in a view of mail messages with just headers, to prioritise dealing with alerts