Which version of Solaris you're using? You might not using full path of the command (it should be in /usr/bin/uuencode)? Can you check:
Code:
~$ which uuencode
~$ whereis uuencode
You can then try folllowing in your script:
Code:
/path/to/uuencode /path/to/foo.txt<space>foo.txt | mailx -s "<subject>" abc@xyz.com
OR
/usr/bin/uuencode /path/to/foo.txt<space>foo.txt | mailx -s "<subject>" abc@xyz.com