Attach file in mailx command

Hi
I want ot send a mail with aatach a file for this i have tried

mailx -s "COMPLETED: deal.sh" -a /usr/local/bin/test.out me@nowhere

uuencode /usr/local/bin/test.out /usr/local/bin/test.out | mailx -s "COMPLETED: deal.sh" me@nowhere

but of command is not working. so is there any otner way to send a mail with attachment.

Thanks in advance