UNIX file attachment in email

Hi,

I have a syntax for mail attachment as
$EMAIL "Wrapper $wrapper_script_name has failed" " $wrapper_script_name has Failed " $failed_email_address

and $EMAIL is as below

MSGSub=${1}
MSGText=${2}
RMAIL=${3}
#set LANG=''
export LANG=''
echo "${MSGSub}" | mailx -s "${MSGText}" "${RMAIL}"

I need to attach test.txt file in email syntax. Can someone help me please. Also note, I do not have permissions to change $EMAIL file. So, what ever need to be done is in email sytax only

Thanks
sp

Check this...