Command line arguments

{|
 * width="100%"|

= Command line arguments - Thunderbird =

Thunderbird supports the following command line arguments:

  All of the Mozilla command line arguments that aren't browser specific. However, you need to figure out what version of Gecko your version of Thunderbird uses to see if some of those command line arguments aren't available. Thunderbird 3.1 is based on Gecko 1.9.2. The -install-global-extension and -install-global-theme arguments have been removed from Gecko 1.9.2 and later versions. Notice the syntax section at the bottom of that writeup. You can use -compose message_options to have it bring up the compose message window and fill in everything for you, but you still need to press the Send button to actually send the message. 


 * Command line arguments for the extension manager. It's used for a number of troubleshooting or system administration tasks such as running in Safe Mode.


 * The -profile &quot;path&quot; (or -P &quot;path&quot;) command line argument to specify the location of the profile. It's used to run Thunderbird with the specified profile regardless of whether the Profile Manager knows about that profile's existence. It's described in more detail in the writeup on USB drive support but it does not require a USB drive. Its useful if you're a roaming user or Thunderbird somehow lost track of your profile (perhaps due to your system crashing) and you want to verify the profile is still good before trying to fix the problem. Example: &quot;C:\Program Files\Mozilla Thunderbird\thunderbird.exe&quot; -profile e:\my_profile will launch Thunderbird with the profile stored at e:\my_profile. A quick sanity check is that e:\my_profile should contain your prefs.js file. Note however that you normally cannot start Thunderbird with a second profile if Thunderbird is already running.
 * The -migration command line argument opens import wizard which help with import data from Outlook (Express) and Mozilla Suite/SeaMonkey.
 * The path of a .eml file. This will launch Thunderbird with a window displaying the contents of the .eml file. For example, &quot;C:\Program Files\Thunderbird\thunderbird.exe&quot; c:\test.eml


 * The -mail URL command line argument opens the message whose URL you specified. Select the message in Thunderbird, enter var hdr = top.opener.gFolderDisplay.selectedMessage; alert(hdr.folder.getUriForMsg(hdr)); in the error console and press the evaluate button to get a popup with the URL. You can't specify the URL for a folder, only for a specific message. [1] For example: thunderbird.exe -mail &quot;mailbox-message://user%40gmail.com@pop.googlemail.com/Templates#12345&quot;
 * The &quot;-addressbook&quot; command line argument opens the address book.

{|
 * width="100%"|

Contents

 * 1 Compose new mail with command line
 * 2 Profile Data protection
 * 3 See also
 * 4 External links
 * }



Compose new mail with command line
You have to use the command line option &quot;-compose&quot; to launch Thunderbird and open a new compose window. The following arguments for this option are available:


 * &quot;to&quot;: used to specify the email of the recipient
 * &quot;cc&quot;: used to specify the email of the recipient of a copy of the mail
 * &quot;bcc&quot;: used to specify the email of the recipient of a blind copy of the mail*
 * &quot;newsgroups&quot;: one or more news groups to submit the message to*
 * &quot;subject&quot;: subject of the mail
 * &quot;format&quot;: compose the message in HTML (&quot;format=1&quot;) or plain text (&quot;format=2&quot;)*
 * with TB 52+ instead of the numbers you can also write strings like &quot;html&quot; or &quot;text&quot; which are not case sensitive
 * &quot;from&quot;: set the from email address here if you have multiple identities and don't want the default one (available in TB 52+)
 * &quot;preselectid&quot;: an identifier for the &quot;From&quot; identity to choose from the menu (obsolete with TB 52+; see the &quot;from&quot; argument)*
 * note that you cannot directly specify an e-mail address but need to find the identity key
 * for example, &quot;preselectid=id2&quot; would select the identity #2
 * you can find the key by try-and-error or by searching for &quot;useremail&quot; in the Config Editor
 * &quot;body&quot;: body of the mail
 * &quot;message&quot;: specify a plain text or an HTML file with UTF-8 encoding for the body of the mail (available in TB 52+).
 * Piping is supported to some degree. On some systems you can specify it this way: message=/dev/stdin
 * &quot;attachment&quot;: specify the directory and the name of an attachment
 * the value should be a file:// url, properly encoded
 * with tb3+, you can alternatively use the absolute file name (unencoded)

*(in Thunderbird 3.1.9 and earlier, these options must be preceded by at least one other option and cannot be at the start of the argument list due to bug 627999.)

Watch out for the somewhat complex syntax of the &quot;-compose&quot; command-line option. The double-quotes enclose the full comma-separated list of arguments passed to &quot;-compose&quot;, whereas single quotes are used to group items for the same argument. Example:


 * thunderbird -compose &quot;to='john@example.com,kathy@example.com',cc='britney@example.com',subject='dinner',body='How about dinner tonight?',attachment='C:\temp\info.doc,C:\temp\food.doc'&quot;

(use attachment=&quot;file:///C:/temp/food.doc&quot; for Thunderbird 2.0) For mailto: urls the &quot;in-reply-to&quot; header is also supported


 * &quot;in-reply-to&quot;: adds In-Reply-To with the provided reference, adds it to References



Profile Data protection
Some users have multiple installations of Firefox on the same PC. The Firefox developers decided they wanted a dedicated profile per installation to make Firefox more stable when switching installations. This also makes it easier not to worry about backwards compatibility. Since Thunderbird uses the Mozilla Toolkit it inherited this feature in the version 68 beta.


 * You may need to edit the Thunderbird shortcut to use -P to specify the profiles location.


 * If you get a &quot;You've launched an older version of Firefox&quot; error message edit the Thunderbird shortcut to add -allow-downgrade . In the future you will need to use that if you want to use an older version of Thunderbird with an existing profile.

