I've got the following code
sub mail_report {
$Mailer = '/usr/sbin/sendmail
joe@somewhere.net';
open MAIL,"|$Mailer";
print MAIL "Subject: $X connection attempt \n";
open MESSAGE, "<$outdir$X";
print MESSAGE '$outdir$X\n';
close MESSAGE;
close MAIL;
} #End sub mail_report
where I would like to insert text from a file as the body of the message at the line
print MESSAGE '$outdir$X\n';
The message is received OK however the text is not inserted into the body of the message.
Could someone point out the error of my ways?
Thanks