Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8063121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:54:56+00:00 2026-06-05T10:54:56+00:00

I already created an extension that does the following: When I run Thinderbird with

  • 0

I already created an extension that does the following:

When I run Thinderbird with the command line thunderbird -MyCustomParam1 "12345" my extension will open a compose window and add the parameter "12345" to the window.

Some code that I use:

// In the calling code
var args = {
  param1: 12345,

};

args.wrappedJSObject = args;
var watcher = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
                            .getService(Components.interfaces.nsIWindowWatcher);
watcher.openWindow(null, url, windowName, features, args);


// In the window code
var args = window.arguments[0].wrappedJSObject;

Of course using the correct url and features.

Now I want to do the same, but for the message window and with am eml file that is choose.

You can open an eml file from the command line like this: Thunderbird test.eml (this will open the mail in a new window).

What I want is the following:

Thunderbird test.eml -MycustomParam1 "1234" should open the mail, and add the param "1234" to screen, so I can access it in the document window, just like example 1.

So basically I want something like watcher.openWindow, but with a given eml file.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T10:54:58+00:00Added an answer on June 5, 2026 at 10:54 am

    You can see how this is done in the MsgOpenFromFile function, it is being called for the File / Open Saved Message menu item. You basically have to take the eml file (get an nsIFile instance from file path), turn it into a URI and then change the query string before opening a message window:

    uri.QueryInterface(Components.interfaces.nsIURL);
    uri.query = "type=application/x-message-display";
    watcher.openWindow(null, "chrome://messenger/content/messageWindow.xul", "_blank",
                       "all,chrome,dialog=no,status,toolbar", uri);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is there any custom asp.net membership providers that someone has already created online. I
I want to update a Post and change relationships with Categories that already created
i already created a table for comments but i want to add the feature
I already created a top level Web Application and site collection. The powershell input
I have already created a webpart to show the data from list, but I
I've already created the Binary Tree and Linked list classes, I'm just in need
I want to write a program to link with binaries already created with VC++.
I can't seem to find the syntax for editing an already-created stored procedure in
I'd like to know if there is a simple (or already created) way of
using Ruby on Rails 2.3.2, since I already created Scaffold for Story, so instead

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.