mailx, uuencode problem

I've this command to run ...

Purpose : Send attachment file with e-mail body...
( E-mail body i read it from text file)

uuencode TEST_FILE.csv TEST_FILE.csv | cat /usr/local/bin/EMAIL_BODY.txt - | mailx -s "TEST Report" -c receiver1@mail.com receiver2@mail.com

Here is the problem .. this command works beautifully in my development server and i get e-mail with body and attachment.

However in Production server i get e-mail but no attachment ... and attachment contents are at the end of the body as garbage data...

Any idea why and what could be wrong here?

I really appriciate your help....

use

cat /usr/local/bin/EMAIL_BODY.txt  | mailx -s "TEST Report" -a TEST_FILE.csv -c receiver1@mail.com receiver2@mail.com 

no need to use uuencode, since, as you describe, uuencode may work different on different plattforms / os releases

Thanks funksen for your reply ..

I've SunOS 5.10 and mailx does not have -a option.

But i found the problem .. the Body file has to have an empty line or space at the end of the file.