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 add the parameter "12345"
to the window.
Some code that I use:
// In the calling code
var args = {
param1: 12345,
};
args.wrappedJSObject = args;
var watcher = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
.getService(Components.interfaces.nsIWindowWatcher);
watcher.openWindow(null, url, windowName, features, args);
// In the window code
var args = window.arguments[0].wrappedJSObject;
Of course using the correct url and features.
Now I want to do the same, but for the message window and with am eml
file that is choose.
You can open an eml
file from the command line like this: Thunderbird test.eml
(this will open the mail in a new window).
What I want is the following:
Thunderbird test.eml -MycustomParam1 "1234"
should open the mail, and add the param "1234"
to screen, so I can access it in the document window, just like example 1.
So basically I want something like watcher.openWindow
, but with a given eml
file.
Any ideas?