Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Thunderbird: getting messageManager for currently displayed email.

22 views
Skip to first unread message

sus...@gmail.com

unread,
Aug 15, 2016, 4:00:09 PM8/15/16
to
Hi friends,

In Firefox we use the gBrowser.selectedBrowser.messageManager to be capable of using the sendAsyncMessage function to communicate to a proper script.

How do we get a messageManager in Thunderbird? The window.messageManager supports only nsIMessageBroadcaster, so there's no way to send a message to specific script using sendAsyncManager.

My solution is:

var emailMessageManager = window.messageManager.getChildAt(0);
emailMessageManager.sendAsyncMessage(...)

I wonder if there is a proper way to obtain this messageManager.

sus...@gmail.com

unread,
Aug 17, 2016, 7:28:30 AM8/17/16
to
Solved:

var msgMgr = window.getBrowser().messageManager;
0 new messages