I read the thread, i am also facing the same problem, but issues is that I cant use sendmail here, i am supposed to use mailx only as sendmail is not available on the system on which i work. I'll be damn happy if anybody can help me out,
Thanx a lot
mailx does not have MIME facilities (at least in the general case). Do you have mutt or pine then?
Like it says in that thread, mailx uses something like sendmail behind the scenes to send off the mail, so maybe you have it after all. Look in /usr/sbin/sendmail and /usr/lib/sendmail as well; or if you have locate, try locate sendmail
You don't really need Perl for that, either. And you should make sure there is an empty line between the headers and the body.
( cat <<HERE; cat /path/to/file.html) | sendmail -oi -t
From: sender@example.com
To: recipients@example.net
Subject: We hate you, so we send HTML instead of plain text
Mime-Version: 1.0
Content-type: text/html
Content-transfer-encoding: 8bit
HERE
You should properly have Mime-Version and Content-Transfer-Encoding headers as well as Content-Type. The issue of correct MIME transfer encoding is one of the many possible complexities which is simply ignored here (and one of the reasons simple shell scripts don't work well in the general case).
If your cat can combine standard input with a regular file, more power to you.