views:

86

answers:

1

How to convert a flat .txt file to .mht?

What APIs are available to help with the conversion?

+1  A: 

.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.

ChssPly76