Command line arguments - Thunderbird: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(→‎Compose new mail with command line: attachment needs full URL in 2.0)
Line 21: Line 21:
Example:
Example:
thunderbird -compose to='address@provider.it',cc='address2@provider.fr',subject="something",body="Something
thunderbird -compose to='address@provider.it',cc='address2@provider.fr',subject="something",body="Something
else",attachment="C:\Documents.7z"
else",attachment="C:\Documents.7z" (use attachment="file:///C:/Documents.7z" for Thunderbird 2.0)


For mailto: urls the "in-reply-to" header is also supported
For mailto: urls the "in-reply-to" header is also supported

Revision as of 15:31, 24 February 2009

Thunderbird supports the following command line arguments:

  • All of the Mozilla command line arguments that aren't browser specific. 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.
  • The -profile "path" 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: "C:\Program Files\Mozilla Thunderbird\thunderbird.exe" -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.

Compose new mail with command line

You have to use the command line "-compose" to launch Thunderbird and open a new compose window. The following arguments are availables:

  • "to" : used to specify the email of the recipient
  • "cc" : used to specify the email of the recipient of a copy of the mail
  • "subject" : subject of the mail
  • "body" : body of the mail
  • "attachment' : 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)

Example: thunderbird -compose to='address@provider.it',cc='address2@provider.fr',subject="something",body="Something else",attachment="C:\Documents.7z" (use attachment="file:///C:/Documents.7z" for Thunderbird 2.0)

For mailto: urls the "in-reply-to" header is also supported

  • "in-reply-to" : adds In-Reply-To with the provided reference, adds it to References

Issues for Thunderbird 1.5.0

The -compose command line argument doesn't work correctly in Thunderbird 1.5 due to a parsing bug. It generates the compose message window but none of the fields are filled in. The only workaround is to use a mailto: URL. However, this prevents you from passing an attachment due to a security restriction.

thunderbird -compose "mailto:somebody@somewhere?cc=address@provider&subject=hi&body=something"

This bug was fixed in 1.5.0.2

See also