I'm not sure what you are asking. The code does not really "store" emails; it exports them from your server to a series of individual files on your local drive.
All email attachments are exported properly. An HTML attachment would be saved as an HTML document. The email message itself would be saved as a plain text file.
If your email client renders email plain text with a default style (font, color, etc.) and you want to export the email text as HTML files with the same style, it wouldn't be that hard for you to do. (I don't really see why you would want to do it, but you could.)