HTML mail with Attachment

Hi,
I am using the below code:

 #!/bin/ksh
 SUBJ="Send mail from Unix with file attachments"
TO=sudha.viswanathan@jpmorgan.com
CC=sudha.viswanathan@jpmorgan.com
(
cat << !
To : ${TO}
Subject : ${SUBJ}
Cc : ${CC}
!
 
cat << !
MIME-Version: 1.0
Content-Type: text/html
`cat DM_WRK_RECON_CHK.html`
!
 
`uuencode DM_WRK_RECON_CHK.csv DM_WRK_RECON_CHK.csv`
!
 ) | /usr/sbin/sendmail -v ${TO} ${CC}

 

This is sending the mail with the HTML body correctly formatted but the attachment is missing.

Strangely, if I remove the below two lines,the attachment and the body is mailed fine. But, the body loses it's html formatting. Please assist.

 MIME-Version: 1.0
Content-Type: text/html
 

Put an extra blank line following the "Content-type: text/html"

Oh, and why do you need to uuencode a .csv file?