>To make this work, you have to specify the list variable ($i):

>$file = "/suidbin/sendmail -t";
>$var = "the_file.txt";
>
>open(FILE, "$var") || die "cant open text file";
>@file = <FILE>;
>close(FILE);
>foreach $i (@addressee) {
>      open(MAIL, "|$file $addressee") || die "can't open sendmail";
>      print MAIL "To: $i\n" ;
>      print MAIL "From: tom_employee\n" ;
>      print MAIL "Subject: Email Message\n" ;
>
>foreach(@file){
>       print MAIL;
>}
>}
>close ( MAIL ) ;
>


This worked perfectly on UNIX, but I also had to substitute $i for
$addressee before it would work on the NT server.

NOW MY NEXT PROBLEM...

The NT machine will only read the first line of "the_file.txt."  The 'cat'
command doesn't seem to work on NT. (The UNIX machine has no problem reading
and printing the entire txt. file.)

THANK YOU! Someday I'll know enough Perl to help somebody else on this
group.

--Deborah

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to