uuencode not working for multiple files

Hi,

I have gone through the other related post but are of no help for me

I am sending multiple files as attachement.
The first file comes fine as an attachement but the other files are coming as binary.

For people with older version of email software they can see all attachements but the people with new version can see only the first attachement.
I have tried the following code but still the same problem.

mailx -s "test" ABC@XYZ.com << EOF
`/usr/bin/uuencode IJK.csv IJKM.csv`
`/usr/bin/uuencode IOU.csv IOLUA.csv`
EOF
(uuencode   IJK.csv IJKM.csv; uuencode -m IOU.csv IOLUA.csv) | mailx -s "test" ABC@XYZ.com

I want to fix the problem from unix side.

Appreciate help

UNIX mail utilities long predated the attachment schemes improvised in the mid 90's. You'll need to use a specialized utility, a custom perl-script, or a full-fledged mail program (such as pine). Here's a perl script to help; but it will require some modules (MIME::Lite and dependencies) to be installed. It only does one attachment at a time, but you can modify it, right?

#!/usr/bin/perl -w
use MIME::Lite;
use Getopt::Std;
our ($opt_d,$opt_s,$opt_f, $opt_h);
getopt('ds:f:h:');

# Specify the mailhub with -h (or localhost used)
# Specify recipients on the command line
# Specify the file to be attached with -f (only one)
# Subject with -s

### Create a new multipart message:
my $msg = MIME::Lite->new(
   From    => $ENV{USER} . '@' . `hostname -f`,
   Subject => $opt_s,
   Type    => 'multipart/mixed'
);

### Add parts (each "attach" has same arguments as "new"):
my (@text) = <STDIN>;
(scalar(@text)) and $msg->attach(
   Type     => 'TEXT',
   Data     => \@text
);

$opt_f and $msg->attach(
   Type     => 'application/zip',
   Path     => $opt_f,
   Filename => $opt_f,
   Disposition => 'attachment'
);

### use Net:SMTP to do the sending
for (@ARGV) {
  $msg->replace('To',$_);
  $msg->send('smtp',($opt_h || "localhost"), Debug=> ($opt_d ? 1 : 0) );
}