Tim/Andreas,
Would you please kindly shed some light on this error:
root:tsts420a$ ./mymailx
Can't locate Mail/Internet.pm in @INC (@INC contains:
/usr/local/lib/perl5/site_
perl/5.005/MIME /usr/local/lib/perl5/5.00503/sun4-solaris
/usr/local/lib/perl5/5
.00503 /usr/local/lib/perl5/site_perl/5.005/sun4-solaris
/usr/local/lib/perl5/si
te_perl/5.005 .) at /usr/local/lib/perl5/site_perl/5.005/MIME/Entity.pm
line 230
.
BEGIN failed--compilation aborted at
/usr/local/lib/perl5/site_perl/5.005/MIME/E
ntity.pm line 230.
BEGIN failed--compilation aborted at ./mymailx line 5.
================
And this is my program mymailx:
#!/usr/local/bin/perl
use lib "/usr/local/lib/perl5/site_perl/5.005/MIME";
use strict;
use MIME::Entity;
my $from = '[EMAIL PROTECTED]';
my $recipients = '[EMAIL PROTECTED]';
my $subject = "mymail test";
my $report_file = "emal.asc";
&attach_mail( $from, $recipients, $subject, $report_file );
exit 0;
sub attach_mail {
my ($from, $to, $subject, $file) = @_;
my $top = build MIME::Entity Type =>"multipart/mixed",
-From => "$from",
-To =>"$to",
-Subject => "$subject";
attach $top Path=>"$file",
Type=>"application/APE",
Disposition=>"attachment",
Encoding=>"binary";
open MAIL, "| /usr/lib/sendmail -t -i" or die "open: $!";
$top->print(\*MAIL);
close MAIL;
}
Thanks