Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

I am trying to get a message URI so I can reference it another app

  • 4 replies
  • 0 have this problem
  • 37 views
  • Last reply by cjholly

Before I recently (& reluctantly) upgraded to TB 140.8.1esr, I used to be able to paste the following in the Error Console to get a URI for an email message (or template) that I wanted to access from my calendaring app (EccoPro -- yeah, I know, one of those "from my dying hands" things, but it has never been equaled much less surpassed, just choked in the cradle by MS Office).

var hdr = gFolderDisplay.selectedMessage; alert(hdr.folder.getUriForMsg(hdr));

I would highlight the message I wanted to use, hit Shft-Ctrl -J, and paste that in the console.

I would get a notice with something like this which I could copy

"mailbox-message://nobody@Local%20Folders/Templates#10"

I could then put a clickable link in my calendaring app to run

"C:\Program Files\Mozilla Thunderbird\thunderbird.exe" -mail "mailbox-message://nobody@Local%20Folders/Templates#10"

That message would open. Then I could hit Ctrl-E to edit it, paste as needed, and send .

This worked very well. I did not come up with it. I struck gold with Google and just copied it. With something similar to AutoHotKey I was able to automate it.

Now those URI codes no longer launch at all, and I cannot get new ones because when I paste

var hdr = gFolderDisplay.selectedMessage; alert(hdr.folder.getUriForMsg(hdr));

into Error Console I get

Uncaught ReferenceError: gFolderDisplay is not defined
   <anonymous> debugger eval code:1
   getEvalResult resource://devtools/server/actors/webconsole/eval-with-debugger.js:306
   evalWithDebugger resource://devtools/server/actors/webconsole/eval-with-debugger.js:218
   evaluateJS resource://devtools/server/actors/webconsole.js:895
   evaluateJSAsync resource://devtools/server/actors/webconsole.js:788
   makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103

If I had known what I was doing in the first place, I might be able to adapt to this version of Thunderbird. Something obviously changed in how the Error Console operates or something.

Does anyone know anything about what command could generate a message URI so I could open it from another app using the command line?

-Chris, the Reluctant Hoosier

Before I recently (& reluctantly) upgraded to TB 140.8.1esr, I used to be able to paste the following in the Error Console to get a URI for an email message (or template) that I wanted to access from my calendaring app (EccoPro -- yeah, I know, one of those "from my dying hands" things, but it has never been equaled much less surpassed, just choked in the cradle by MS Office). var hdr = gFolderDisplay.selectedMessage; alert(hdr.folder.getUriForMsg(hdr)); I would highlight the message I wanted to use, hit Shft-Ctrl -J, and paste that in the console. I would get a notice with something like this which I could copy "mailbox-message://nobody@Local%20Folders/Templates#10" I could then put a clickable link in my calendaring app to run "C:\Program Files\Mozilla Thunderbird\thunderbird.exe" -mail "mailbox-message://nobody@Local%20Folders/Templates#10" That message would open. Then I could hit Ctrl-E to edit it, paste as needed, and send . This worked very well. I did not come up with it. I struck gold with Google and just copied it. With something similar to AutoHotKey I was able to automate it. Now those URI codes no longer launch at all, and I cannot get new ones because when I paste var hdr = gFolderDisplay.selectedMessage; alert(hdr.folder.getUriForMsg(hdr)); into Error Console I get Uncaught ReferenceError: gFolderDisplay is not defined <anonymous> debugger eval code:1 getEvalResult resource://devtools/server/actors/webconsole/eval-with-debugger.js:306 evalWithDebugger resource://devtools/server/actors/webconsole/eval-with-debugger.js:218 evaluateJS resource://devtools/server/actors/webconsole.js:895 evaluateJSAsync resource://devtools/server/actors/webconsole.js:788 makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103 If I had known what I was doing in the first place, I might be able to adapt to this version of Thunderbird. Something obviously changed in how the Error Console operates or something. Does anyone know anything about what command could generate a message URI so I could open it from another app using the command line? -Chris, the Reluctant Hoosier

All Replies (4)

Thanks, Ed. I had looked at thunderlink but I don't think I can open a thunderlink with a command line argument. I think it involves touching the dreaded mouse -- or touchypad in my case.

I was able to add a command line argument with my previous solution. After poking around with message ID and taking advantage of Copy Message ID add-on, I was able to run this using Windows-R

"C:\Program Files\Mozilla Thunderbird\thunderbird.exe" mid:"03a1a960-3e37-aa0d-a58e-b685ee279db7@medicaidguide.com"

which should work in my 32-bit EccoPro program (from the days when programs were programs and apps were -- well, unknown!) But it doesn't yet.

Problem is it is really really really really really slow. Too slow to bother really, unless I am getting up to get more coffee or pee or truthfully both.

I think it might be some of JScript problem that somehow changed in Tbird, but that is only an uneducated guess.

Surely there is still some way find the URI of a message.

Try mozillaZine TB Support - http://forums.mozillazine.org/viewforum.php?f=39). There is someone there who most likely can figure out what 'ar hdr = gFolderDisplay.selectedMessage; alert(hdr.folder.getUriForMsg(hdr));' got changed to.

Thanks, Ed, I'll try that. --Chris

Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.