Yes, you can create emails with any program you want.
The trick is how to send it. You might be able to just copy and past it into your email editor. However, I don't image that this would work very well (although it's worth a try).
I'd write a program in Java to read your html file and send it to whom ever you wanted.
Note: HTML in emails generally include everything within one file. So the CSS is internal to the email. Javascript is not recommended. Images are frowned on, but can be included in the email or from an external server like any other html page.