messages in thunderbird have different properties to identify
themselves:
URI : imap-message://b...@domain.name.com/INBOX#8044
messageKey : 8044
messageId : 66F3EE10-DBA7-4C4F...@domain.com
Is there a function to tell thunderbird to load a particular message
in the message pane ?
I tried to use SelectAndScrollToKey(messageKey) but it scrolls to
message within the current folder.
It would be even better if it could be done from the outside (looks
like google desktop knows how to do it). I played and looked at the
code behind the -remote argument of the command line but i wasn't able
to find a solution.
It would be helpfull if you some extension to look at. Or to tell me
if the only solution is to go through all the folder and messages to
test the id...
Thanks
Aurélien
By following the advices at http://kb.mozillazine.org/UserChrome.js/Mail
, I am now able to show the message i want in the message-pane given
its uri.
uri : imap-message://...@domain.name.com/INBOX#8044
messageKey : 8044
// Select the folder
with (document.getElementById("folderTree").view)
for (var i = 0; i < rowCount; ++i) with (getResourceAtIndex(i))
uri == Value? selection.select(i) : uri.indexOf(Value) == 0 && !
isContainerOpen(i)? toggleOpenState(i) : null
// scroll to the right message
SelectAndScrollToKey(messageKey);
However, the message uri doesn't stay the same if you move the message
into another folder.
So I guess the solution would be to identify the message by its
header.messageId property ?
Apple allows to click on links of type message://messageId that will
open in Mail.app.
Does anyone knows given the messageId what to call to display the
message in the message pane of Thunderbird ?
Aurélien
Take a look at http://www.xulplanet.com/references/xpcomref/ifaces/nsIMsgDatabase.html
nslMsgDatabase gives you access to msgHdrs by calling
getMsgHdrForMessageID
Dan.