Adding several attachments to thunderbird (from command line)
Asked Answered
O

2

5

I try to create a new message with several attachments via command line, but this does not work:

thunderbird -compose "attachment='/etc/mtab',attachment='/etc/fstab'"

Only the first file gets attached. The second is missing.

What is wrong with the above command line?

PS: I tried xdg-email first, but this fails. See How to open the user's preferred mail application on Linux?

Omnivore answered 8/1, 2015 at 9:17 Comment(0)
T
9

the command must be specified as

thunderbird -compose "attachment='/etc/mtab,/etc/fstab'"

I have tried under windows.

Toulouse answered 17/1, 2015 at 18:27 Comment(2)
I tried it under linux, it works too. Note however that the attachment must be written with its absolute path.Cavil
Note that if you call this from python, you have to replace the comma by %2C import os command = f'thunderbird -compose to="{receiver}",subject="{subject}",body="{body_text}",attachment="{file_path1}%2C{file_path2}"' os.system(command)Slackjawed
S
0

Another way to attach several files:

thunderbird.exe -compose to="[email protected]" ,subject="SubjectText" ,body="bodytext" ,attachment='D:\File.txt,D:\File2.txt'
Sentimentality answered 30/8, 2016 at 16:44 Comment(2)
This is the same as the accepted answer that has been on the site for well over a year?Cutanddried
Thank you. This answer was helpful to understand how to set the To and Subject fields.Henryk

© 2022 - 2024 — McMap. All rights reserved.