Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am often using the terminal, and I'd like to be able type a command that will attach a selected file to an email in mail.app.

:~ mailme myfile

Any idea on how to do that?

share|improve this question

2 Answers 2

up vote 12 down vote accepted

The command

open -a Mail.app [filename(s)]

opens a "New Message" window in Mail.app, with the filename(s) attached.

share|improve this answer
1  
excellent, thanks, I'll make myself an alias –  kaklon Nov 15 '11 at 16:32

Works also with Thunderbird

open -a Thunderbird filename

It seems that yout can attach only one file to a new e-mail.

share|improve this answer
    
Could you give an example for open -a Thunderbird [filename(s)] . I tried the following but none worked open -a Thunderbird ["filename1","filename2"] open -a Thunderbird [filename1,filename2] open -a Thunderbird ['filename1','filename2'] for single files open -a Thunderbird filename works like a charm. –  avk Nov 3 '12 at 3:41
    
Oops, sorry. I did't tested it before posting. It seems attaching more files doesn't work. I'll edit the answer. –  Dali Nov 19 '12 at 11:21

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.