Support multiple command line arguments for recipients and attachments following -compose



10 years ago
9 years ago


(Reporter: flanker, Unassigned)


Firefox Tracking Flags

(Not tracked)





10 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/2009032711 Firefox/3.0.8
Build Identifier: 20090103

From the command line, you can compose a new message with: thunderbird -compose to="",attachment="file:///my/file.txt"

However, it's impossible to specify more than one person for the To field.  Also impossible to specify multiple attachments.  I suspect (but have not verified) that the same is true for the CC field also, even though it really only makes sense to restrict the subject and body to a single value.

I'm requesting that the command line parser accept multiple attachments and recipients in some format, which I'll leave up to the developers.

I will, however, suggest the following syntax as probably the safest way to avoid parsing errors due to odd characters in filenames:
thunderbird -compose attachment="file:///fileA.txt",attachment="file:///fileB.txt"

Reproducible: Always

Steps to Reproduce:
1. Try your hardest to launch a compose window from the command line with multiple attachments or To: recipients.
2. Keep trying.
3. Fail and come back here to vote for my request. :)
Actual Results:  
Unable to launch a compose window with multiple attachments or "To:" recipients.

Expected Results:  
Able to launch a compose window with multiple attachments or "To:" recipients.

Comment 1

10 years ago
It's just a matter of syntax, following works for me with 3.0 beta on Linux:
> thunderbird -compose "attachment='file:///tmp/one.pdf,file:///tmp/two.pdf',to=','"

Attaching both files and addressing to both recipient given. Note the nesting of the " and ' quotes as well as the location of commas.

-> WFM
Last Resolved: 10 years ago
Resolution: --- → WORKSFORME


10 years ago
Duplicate of this bug: 494873

Comment 3

10 years ago
Thanks. I really searched the bug db... :-(

Note to Java programmers as myself:
If you use Runtime.exec(String[]), you need to leave out the double quotes as Java seems to add them automatically when there's a Comma in the String or something.
Your String[] would then look like
[/path/to/thunderbird, -compose, subject=MySubject,to='addy1@server.tld,addy2@server.tld',body=this%20is%20a%20mail%20body%21,attachment='file:/home/username/test.txt']

I hope this helps others...

Comment 4

10 years ago
Many thanks, it works for me also with this syntax.  When there's time, might I suggest that this gets documented somewhere accessible?


9 years ago
Duplicate of this bug: 532725
You need to log in before you can comment on or make changes to this bug.