I would like to open a new message Outlook window from terminal and ideally prefill the message body too.
Any ideas on how to accomplish this? Txn!
Office is moderately scriptable with AppleScript, so the command line interface to AppleScript can get the job done.
Try this (adapted from this blog post by Jim Shank), replacing the subject text, name and email as appropriate:
It's a bit lengthy, but it will get the job done. You could adapt this into a small script that you could call and provide parameters to more concisely (i.e.
The first step is to change your default mail reader on your Mac:
Next from the terminal, use the open command with the mailto: URL. Here is an example:
You can see more examples of the mailto: URL here: http://www.rapidtables.com/web/html/mailto.htm