How to convert a flat .txt file to .mht?
What APIs are available to help with the conversion?
How to convert a flat .txt file to .mht?
What APIs are available to help with the conversion?
.mht format is basically a multipart e-mail message.
You can thus use JavaMail to create it - look at MimeMultipart class in particular.
That said, I'm not quite sure how you intend to convert plain text into it - unless, of course, your text file contains some sort of layout markup.