I have a plugin for thunderbird that opens a mail file in the following way:
var uri = io.newFileURI(filePath);
uri.QueryInterface(Components.interfaces.nsIURL);
uri.query = "type=application/x-message-display";
watcher.openWindow(null, "chrome://messenger/content/messageWindow.xul",
"_blank", "all,chrome,dialog=no,status,toolbar", uri);
This works fine.
There is only one problem with HTML mails. They open just fine, but when they get printed, the message source is printed. Also the attachments source is printed.
Is there a way to specify that it is an HTML file that is being opened/printed? Any other suggestion?