Send an e-mail using ksh

Hi,

I have a small script that outputs to a text file. I need to e-mail the contents of the text file to a mail alias. However, I cannot seem to get the script to print the 'subject', my script just leaves it blank. Has anybody any ideas what is wrong?

if [ -s ~/merge_results2.txt ]
then
(echo "\nHere is the report from the RE team [unmerged files between JIL 2.0 and 2.5]...\n" ;cat ~/merge_results2.txt) | mail -s "Sync merge between 2.0 and 2.5" <my e-mail>
fi

Regards

Here is what I use:

( cat <<HERE /path/to/file/as/body ) | /usr/sbin/sendmail -oi -t
From: someone@somedomain.com
To: someoneelse@somedomain.com
Subject: Email Subject Here
Content-Type: text/html; charset=iso-8859-1;

HERE

cat ~/merge_results2.txt | mailx -r daemon@domain.com -s 'Sync merge between 2.0 and 2.5' user@domail.com

( source in russian )

Thanks folks - that worked a treat!