Skip to content Skip to sidebar Skip to footer

Thunderbid Extension: Open Eml File

I already created an extension that does the following: When I run Thinderbird with the command line thunderbird -MyCustomParam1 '12345' my extension will open a compose window and

Solution 1:

You can see how this is done in the MsgOpenFromFile function, it is being called for the File / Open Saved Message menu item. You basically have to take the eml file (get an nsIFile instance from file path), turn it into a URI and then change the query string before opening a message window:

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);

Post a Comment for "Thunderbid Extension: Open Eml File"