sending email from a ksh script

hi all,
i have a ksh script which is meant to send an email with an attachment. i use the following command to send email

/usr/bin/uuencode $logFn $logFn | /usr/bin/mail -s "restoration results" $EMAILTO;

where '$logFn' is the name of the file including the full path e.g /appl/log/output.log

when i try and execute the script, the email which i receive has garbage characters in the body of the email and there are no attachments. sample email i get is :

begin 640 /appl/log/output.log
M5&AU($]C=" R,B Q,CHR,#HQ,B!.6D14(#(P,#D@(" @("!R97-T;W)I;F<@
M9&%T82!N;W<@+BXN"E1H=2!/8W0@,C(@,3(Z,C Z,C0@3EI$5" R,# Y(" @
M(" @26YV;VMI;F<@<W1O<F5D('!R;V-E9'5R92XN+@I[,C(M,3 M,C P.2 Q
M,CHQ,#HQ,B @($EN<V5R=&5D(#$V.#,@<F]W<R!I;B!#04U?0T%,3%]154E#

but when i manually type the uuencode command from the same directory as the log file and hit 'enter' it works.

any suggestions on what could be wrong ??

thanks in advance.

---------- Post updated at 07:58 PM ---------- Previous update was at 07:03 PM ----------

ok got it.

i should use 'mailx' instead of 'mail'. spotted it while reading and verifying my own post !!