»
estematt
- MIME::LITE hangs
We installed new UNIX RS6000 server perl script uese MIME::LITE to send email via Lotus Notes process time is slow eventually after 1 minute return to prompt
below is perl script code
#!/usr/local/bin/perl
$filedir = $ENV{HRPRNETDIR}.'/cobra/';
chdir $filedir;
@list = `ls $detailfile`;
chomp @list;
while (@list) {
$attachment = shift @list;
use MIME::Lite;
my $msg = MIME::Lite-new( To= 'jfimbel@nbty.com',
From = 'NBTY WW501PROD Lawson job',
Subject = 'WWAGESCOBRA.csv attached',
Type = 'multipart/mixed');
$msg-attach(Path = $attachment,
Type = 'Auto',
Disposition = 'attachment');
$msg-send;
}
sub EmailError {
$errmsg = @_[0]."\n";
use MIME::Lite;
my $msg = MIME::Lite-new( To= 'jfimbel@nbty.com',
From = 'NBTY WWW501PROD Lawson job',
Subject = 'Error',
Type = 'multipart/mixed');
$msg-attach(Type = 'TEXT' , Data = $errmsg);
$msg-send;
exit;
}