This is a small tip about sending mails via Perl code.
sub mail {
my( $to, $from, $sub, $msg ) = @_;
my( $send ) = "/usr/lib/sendmail";
open MAIL, "| $send -oi -t";
print MAIL "From: $from\n";
print MAIL "To: $to\n";
print MAIL "Subject: $sub\n\n";
print MAIL "$msg\n";
close MAIL;
}
Have fun!@