The best thing you can do is look at the raw output of a HTML formatted eMail then emulate it.
Here's the basics of what I did
create the script web-email.sh with the content below
#!/usr/bin/sh
(
cat $1 | /usr/sbin/sendmail -t
)### end of script
Some caution should be observed because outlook has some weird behavior.
Keep in mind that you still need to define the sendmail To:, From:, Subject, etc which can not be in HTML format.
Example: aa.out has the contents below:
To:
sombody@someplace.com
From:
sombodyelse@someplace.com
Subject: HTML Email
Content-Transfer-Encoding: quoted-printable
--__________MIMEboundary__________
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
< the HTML YOU WANT to send in the BODY of the email goes here >
--__________MIMEboundary__________--