Closed
Bug 386919
Opened 18 years ago
Closed 18 years ago
Support opening a message from the command line
Categories
(Thunderbird :: General, defect)
Thunderbird
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Bienvenu, Assigned: Bienvenu)
Details
Attachments
(2 files)
10.28 KB,
patch
|
Details | Diff | Splinter Review | |
11.17 KB,
patch
|
mscott
:
superreview+
|
Details | Diff | Splinter Review |
We should be able to open a message from the command line. The command line should be something like:
thunderbird -mail mailbox-message://user@host/<folder>#msgkey
or
thunderbird -mail mailbox-message://user@host/<folder>?messageId=<message id>
Assignee | ||
Comment 1•18 years ago
|
||
This basically works, though there are some potential refinements, like handling escape of the message id...
Assignee | ||
Comment 2•18 years ago
|
||
And perhaps we should have case-insensitive parsing of "messageId", and perhaps have a pref for whether we open the new message in a stand-alone window, or in the 3-pane ui.
Assignee | ||
Comment 4•18 years ago
|
||
I'd like to land this on the trunk so developers can try it out...
Attachment #271112 -
Flags: superreview?(mscott)
Assignee | ||
Comment 5•18 years ago
|
||
We may also want to make it so messages open in a new tab, though I don't know how we're going to communicate that from nsMessengerBootstap.cpp to msgMail3PaneWindow.js. Some extra param in the array that gets passed to it, I guess.
Comment 6•18 years ago
|
||
Comment on attachment 271112 [details] [diff] [review]
proposed fix
ditch the braces here ?
+ else
+ {
+ GetMsgDBHdrFromURI(nativeArg.get(), getter_AddRefs(msgHdr));
+ }
Attachment #271112 -
Flags: superreview?(mscott) → superreview+
Assignee | ||
Comment 7•18 years ago
|
||
fixed on trunk.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 8•18 years ago
|
||
Thanks, I'll take a look at it.
Comment 9•18 years ago
|
||
Comment on attachment 271112 [details] [diff] [review]
proposed fix
>+ if (queryIndex > 0)
>+ {
>+ nsCString messageId, folderUri;
>+ nativeArg.Right(messageId, nativeArg.Length() - queryIndex - 11);
>+ nativeArg.Left(folderUri, queryIndex);
>+ folderUri.Cut(folderUri.Find("-message"), 8);
>+ return OpenMessengerWindowForMessageId(folderUri, messageId);
>+ }
>+ else
>+ {
>+ GetMsgDBHdrFromURI(nativeArg.get(), getter_AddRefs(msgHdr));
>+ }
Nit: unnecessary else after return
Comment 10•13 years ago
|
||
Related to this bug: what is the correct URL format for thunderbird and openURL?
Another question, in the regular scheme should special characters be an issue. I get an error if a I use -mail to open a message with the following messageId:
057301cdc814$7d689740$7839c5c0$@rice.edu
The error is illegal value. If I change the dollar symbols to %24, I still get an error.
Comment 11•11 years ago
|
||
I tried to use it with
thunderbird.exe -console -mail mailbox-message://user@host/<folder>?messageId=<message id>
but in the console there's this error:
Unrecognized URL: mailbox-message://user@host/<folder>?messageId=<message id>
(The "Thunderbird console" shows up only if started with first instance of Thunderbird)
You need to log in
before you can comment on or make changes to this bug.
Description
•