Compose a message (with attachments) from Terminal

How to compose a new message and attach one or more files from the command line (Mac OS X Terminal application).

command_line-1.png

  1. Enter the "open" command and add the "-a Mailplane" option to tell open the listed files in Mailplane

    open -a Mailplane file1 [file 2] [...]

    example: open -a Mailplane mypicture.jpg anotherfile.doc

  2. As a result Mailplane will open a new window and attach all listed files. Attachment optimization will work as usual (folder get zipped, pictures are displayed in the optimization window).

Tip: Create a shell alias

You can create a custom 'mailplane' command for easier use:

  1. Open your shell login script in your favorite editor (for example ~/.bash_login)
  2. enter alias mailplane='open -a Mailplane'
  3. open a new Terminal window and try mailplane thefile.jpeg

Published on 16 Sep 2010 by Ruben.