A Command Line URL To Access Thunderbird Messages

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

A Command Line URL To Access Thunderbird Messages

Kevin Kubasik-2
Hey All,

I'm currently working with some of the developers over at Gnome's Beagle
Project[1] and while we can index Thunderbird's Email content without
too much of an issue (the mbox backend is a huge help there, thanks
all!) our major issue in fully implementing a Thunderbird backend is our
inability to open a search result in Thunderbird.

For Example, say we have 3 emails in our Inbox Folder, if we want to
open email #2, we have no way to have Thunderbird open with the email in
question opened or even highlighted. While there has been speculation as
to possible solutions implemented using an extension, it seems that
there has to be a better way.

So my question is really 2 fold.

1) Does there exist some way to have Thunderbird open a specified email
upon opening it, and if so, is this method feasible for processes
already running?

2) If no such system exists would it be at all reasonable to expect that
Thunderbird Developers might be open to implementing some sort of URI
for accessing mails from 3rd party programs?

A propsed URI might go as follows
Code:
mail:///<account-Name>/<Folder.subfolder>/<a message UID>

It could have easy support for Thunderbirds other backends as well
Code:
feed:///<account-Name>/<Feed-Title>/<message UID>

A sample call could then become an easy
Code:
Thunderbird mail:///[hidden email]/Inbox/mID1665+


While I realize that this would be a pretty large feature addition, and
constitute a large amount of work, I wanted to at least get the idea out
there. Should you not want to implement anything like this or know of
any system like this to access Thunderbird, could the comment please be
constructive? If no one has any objections, I'll file it as a
enhancement for Thunderbird 2.0.


[1]-http://www.beaglewiki.org
Cheers,
Kevin Kubasik
http://blog.kubasik.net
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: A Command Line URL To Access Thunderbird Messages

Rod Whiteley
On 19/03/2006 18:10, Kevin Kubasik wrote:
> ... possible solutions implemented using an extension, it seems that
> there has to be a better way.

An extension seems reasonable to me, because I suppose few users will
need this feature.

> ... A propsed URI might go as follows
> Code:
> mail:///<account-Name>/<Folder.subfolder>/<a message UID>

I see that Thunderbird already uses URIs to identify messages
internally.  They look like:

mailbox-message://[hidden email]/Inbox#1234567

--
Rod Whiteley
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: A Command Line URL To Access Thunderbird Messages

Kevin Kubasik-2
Thanks much, I have managed to get most of this worked out, but I still
have an issue with identifying the 'number' value. A sample (working)
URI/URL is

mailbox:///home/kevin/.mozilla-thunderbird/*.default/Mail/Local\
Folders/Sent?number=4614

The only issue is for the life of me I cannot find where that number
value comes from. Some of the Thunderbird code seems to refer to it as
the message-id/message-key but even in the mork db I can't seem to find
this.

Any thoughts?

Cheers,
Kevin Kubasik


Rod Whiteley wrote:

> On 19/03/2006 18:10, Kevin Kubasik wrote:
>> ... possible solutions implemented using an extension, it seems that
>> there has to be a better way.
>
> An extension seems reasonable to me, because I suppose few users will
> need this feature.
>
>> ... A propsed URI might go as follows
>> Code:
>> mail:///<account-Name>/<Folder.subfolder>/<a message UID>
>
> I see that Thunderbird already uses URIs to identify messages
> internally.  They look like:
>
> mailbox-message://[hidden email]/Inbox#1234567
>
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: A Command Line URL To Access Thunderbird Messages

Rod Whiteley
On 23/03/2006 2:51, Kevin Kubasik wrote:
> ...where that number value comes from...

The number seems to be the byte offset where the message starts in the
file.  I have never actually worked with these URIs, so I don't know how
they are used within the code.

--
Rod Whiteley
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: A Command Line URL To Access Thunderbird Messages

David Bienvenu
Yes, for local messages, it's the byte offset into the mailbox of the
message. For IMAP, it's the IMAP  UID, and for news, it's the article
number.

- David Bienvenu

Rod Whiteley wrote:
> On 23/03/2006 2:51, Kevin Kubasik wrote:
>> ...where that number value comes from...
>
> The number seems to be the byte offset where the message starts in the
> file.  I have never actually worked with these URIs, so I don't know
> how they are used within the code.
>
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: A Command Line URL To Access Thunderbird Messages

günter
In reply to this post by Kevin Kubasik-2
Hi,

just noticed your thread and would like to know if there is any
"solution" for your request.

I'm working together with Tom to get a smooth integration of
"ReminderFox" with Thunderbird.
It's working fine in the TB environemnt, but because the reminders and
todo can alos be worked on alos using FX, it would be smart to
start/call TB with a given messageID -- the unique code for a msg.

The only solution I found is an extension to a standard TB routine ,a
very generic statement which would be appended to the TB-startup
routine. Have a look into it:

> Details  -- Requirements
> =========================
> with         Thunderbird\messenger.jar\content\messenger\msgMail3PaneWindow.js
>
> at the end of the function
>
>     /* Functions related to startup */
>     function delayedOnLoadMessenger()
>     { ..........
>
> this code snippet has to be added:
>
>     //===============================================================================
>     //      added to be able to call a additional routine at end of the loading process
>         try {
>             onLoadMessenger_hook();
>             }
>             catch (err) {
>             }
>     //===============================================================================
>     }
>
>     function OnUnloadMessenger()
>     {  ..........
>
> Any function within TB could use the above routine.
>
> Reminderfox  would do the following:
>
>     function onLoadMessenger_hook() {
>     /*===========================================================================================
>      *      ReminderFox "View-Mail" called from externally
>      *      (eg. Firefox with modification --see below) with :
>      *        thunderbird -mail "mailbox://X-REMINDERFOX-MESSAGEID:<[hidden email]>"
>      *
>      *    >>> this function is called at the end of a modified TB-routine:
>      *    >>>   "delayedOnLoadMessenger" in "msgMail3PaneWindow.js"   part of "messenger.jar"
>      */
>             var messageId = window.arguments[0]
>             if (messageId.substring(0,34) == "mailbox://X-REMINDERFOX-MESSAGEID:")
>             {


Do you know if there is another soltion out there, or how to get this
approach done ??

Neandr alias Guenter




Am 19.03.2006 19:10  schrieb  »Kevin Kubasik«

> Hey All,
>
> I'm currently working with some of the developers over at Gnome's Beagle
> Project[1] and while we can index Thunderbird's Email content without
> too much of an issue (the mbox backend is a huge help there, thanks
> all!) our major issue in fully implementing a Thunderbird backend is our
> inability to open a search result in Thunderbird.
>
> For Example, say we have 3 emails in our Inbox Folder, if we want to
> open email #2, we have no way to have Thunderbird open with the email in
> question opened or even highlighted. While there has been speculation as
> to possible solutions implemented using an extension, it seems that
> there has to be a better way.
>
> So my question is really 2 fold.
>
> 1) Does there exist some way to have Thunderbird open a specified email
> upon opening it, and if so, is this method feasible for processes
> already running?
>
> 2) If no such system exists would it be at all reasonable to expect that
> Thunderbird Developers might be open to implementing some sort of URI
> for accessing mails from 3rd party programs?
>
> A propsed URI might go as follows
> Code:
> mail:///<account-Name>/<Folder.subfolder>/<a message UID>
>
> It could have easy support for Thunderbirds other backends as well
> Code:
> feed:///<account-Name>/<Feed-Title>/<message UID>
>
> A sample call could then become an easy
> Code:
> Thunderbird mail:///[hidden email]/Inbox/mID1665+
>
>
> While I realize that this would be a pretty large feature addition, and
> constitute a large amount of work, I wanted to at least get the idea out
> there. Should you not want to implement anything like this or know of
> any system like this to access Thunderbird, could the comment please be
> constructive? If no one has any objections, I'll file it as a
> enhancement for Thunderbird 2.0.
>
>
> [1]-http://www.beaglewiki.org
> Cheers,
> Kevin Kubasik
> http://blog.kubasik.net
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird