> message, how could I do this in perl?
>
> /usr/sbin/sendmail [EMAIL PROTECTED] < ./file.txt
>
> I am trying to avoid slurpping the file into an array. my
> @array = `/bin/cat
> ../file.txt`
how about something like this:
my $sendmail = '/usr/lib/sendmail';
my $userName = '[EMAIL PROTECTED]';
my $subject = "subject";
my $body = `cat $log`;
my $mailMessage=<<EOF;
To: $userName
Subject: $subject
$body
EOF
open(MAIL, "| $sendmail -t -oi 2>/dev/null") or die "unable to open
sendmail:$!\n";
print MAIL $mailMessage ;
close MAIL;
>
> Also, is it possible to tell sendmail that the file type is html?
do you mean so you can send the email in HTML?
Here is a snippet from a previous post to this group that does this:
--
open(MAIL,"| $smail");
print MAIL "From: etucker\n";
print MAIL "To: $ubr_info{'email'}\n";
print MAIL "Subject: Errors on $ubr_info{'IP'}\n";
print MAIL "content-type: text/html\n\n";
print MAIL "<html>";
print MAIL "<p><b> THIS IS A TEST</b></p>";
print MAIL "</html>";
--
so i assume of the file is in html it should work as long as you print the
header like above
>
> -James
>
> James Kelty
> Director of Operations
> Everbase Systems, LLC
> 624 A Street
> Ashland, OR 97520
> [EMAIL PROTECTED]
> 541.488.0801
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]