For starters, you can always check the value of $?. $? holds the return code (errno) of the last command processed.
uuencode tmpFile | mailx -s "sub1" emailid
if [ $? -ne 0 ] then ;
echo "failed attempt. "
exit
fi
Also, try sending your message to an account outside of your company. For whatever reason, I cannot send messages from my clients unix server to my work email, but I can send them to an account such as Yahoo. Not sure if there are rules in place coming into my company or leaving the unix server but either way, one side wont allow mail to my work domain.