Sending mail, status checking

After I send a mail thr unix with following command

uuencode tmpFile | mailx -s "sub1" emailid

Yet, I havent received this mail at intended mail client.
In order to find out if the sent mail action resulted in failure,
I checked at

/usr/spool/mail/userid

But there also I couldnt find this mail with subject sub1 returned as failed delivery.

Is there any way to check whether sent mail was a successful operation?

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.