How can I write a HTML file in UNIX and sent it as a body of a mail

Hi,
How can I write a HTML file in Unix.
Once I do that, I want to send this file as a body of a mail, along with writing a subject for the mail I am sending through unix.
How can that be done?