It's my first time to use sendmail. I want to my script to send a mail to [EMAIL PROTECTED] or whoever is in the To: line. The script warns:"No recipient name found in the header" and dies, even though there's a recipient. I'm puzzled.

#######################################
#!/usr/bin/perl -w

use strict;


mail_users();



sub mail_users{


open(MAILPROG, "|/usr/sbin/sendmail -oi -t") || die "Can't open sendmail: $!\n";
print MAILPROG <<"END_MAIL";
From: ftp_update.pl
To: root <[EMAIL PROTECTED]>
Subject: Software updates


Hello


You may copy and paste this at the shell-prompt to test dependencies:



You may also use this command to install the Packages:



END_MAIL


close(MAILPROG);

#################################################

Babs


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to