MIME - HTML mail with Excel attachment - Please help!

#!/bin/ksh
(
echo "MIME-Version: 1.0"
echo "Content-Type: multipart/mixed; boundary=frontier"
echo "--frontier"
echo "Content-Type: text/html"
echo "Content-Disposition: inline"
echo "\n"
echo "<html><body><h1>this is html formatted text</h1></body></html>"
echo "--frontier"
echo "Content-Type: application/vnd.ms-excel"
echo "Content-Disposition: attachment"
echo "\n"
uuencode a.xls a.xls
echo "--frontier--"
)| /usr/lib/sendmail asdf@asdf.com

The above code doesn't work. HTML part works well, but the sent Excel sheet contains the encoded data, not the actual one. I cannot use "Content-Transfer-Encoding: base64" because -m option is not supported by uuencode in my system. Please help!

openssl has a base64 encoder.

mutt would be simpler.