#!/usr/bin/perl -n # thanks to Brian Dowling for an example with security in mind. $TO = 'email@dot.com'; $FROM = $TO; s/^<\d{1,2}>//; open(MAIL, "|/usr/sbin/sendmail -t"); print MAIL <<"EOT"; To: $TO From: $FROM Subject: Log Alert: $_ $_ EOT close(MAIL);