Problem with uuencode

i used below code to attach a file but it's not attaching the file but sendinf a simple mail

uuencode ${discord_file} mail_list.txt | mailx -s "TEST MAIL" xxx@yahoo.com

Check if your ${discord_file} is substituted correct and found in the filesystem. Also give some short text as mailbody with echo maybe.

(echo blablablabla; uuencode ${discord_file} mail_list.txt) | mailx -s "TEST MAIL" xxx@yahoo.com

thanks zaxxon

try repeating the file name twice as shown below.

this works on an aix system:
uuencode filename filename | mail -s"subject" username@yahoo.com

and this works on a sun system:
uuencode filename filename |mailx -s"tst" -U user@yahoo.com