Hello Monks,
I am working on a script that mails the contents of a file, but for some reason the first line is always truncated. I tested this by adding a blank line at the beginning of the file, then it seemed to work as expected. I'd like to see if someone can tell me where I've gone wrong here:
open(MAIL, "|mail $EMAIL");
print MAIL "To: $EMAIL\n";
print MAIL "From: $FROM\n";
print MAIL "Subject: $MAILSUB\n";
print MAIL "Content-Type: text/plain; charset=\"iso-8859-1\"";
open(MESSAGE, "<", "$TMPFILE") or die "$!";
print MAIL <MESSAGE>;
close MESSAGE;
close MAIL;
Thanks!