Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

As it says on the tin really. I would like to send some of my etc files to a colleague and it would be handy to cat them to a new Thunderbird email message.

Is this possible? If so how?

share|improve this question
    
I use mutt for this (is a command line mail that can also attach files). –  Rinzwind Jun 13 '11 at 8:30
    
@Rinzwind I know of mutt, but it is too much work to get it setup with the infernal Exchange server we have here at work so I was hoping to be able to use Thunderbird to save on setting it all up in an email client twice! :-) Thank you for the suggestion though. –  Treffynnon Jun 13 '11 at 10:21

2 Answers 2

up vote 1 down vote accepted

Give this a try, it's working fine for me:

cat /etc/[file1] /etc/[file2] /etc/[file3] > ~/configs.txt && thunderbird -compose "subject='test',attachment='~/configs.txt'"

or (a revised command which will also print each filename):

for file in /etc/[file1] /etc/[file2] ; do echo -e '\n ****' $file '**** \n' >> ~/configs.txt ; cat $file >> ~/configs.txt ; done && thunderbird -compose "subject='test',attachment='~/configs.txt'"

Just replace the [fileX] names with the ones you're interested.

The above command will create a new file named configs.txt with all of the config files you want and add it as an attachment to a new 'compose mail' window in TB.

share|improve this answer

I googled «thunderbird command-line», and this first hit seems to be what you want: http://kb.mozillazine.org/Command_line_arguments_(Thunderbird)

share|improve this answer
    
+1 I didn't think to generalise my query like that. Good find. –  Treffynnon Jun 13 '11 at 12:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.