I am trying to start composing a new message via mailto on OS X. I have set my default email client to be Outlook, so I can open up Outlook with a preconfigured message like so:
open 'mailto:[email protected]?subject=hey&body=how are you doing'
but I want to also be able to use the mailto link to add an attachment to the preconfigured message. I have tried the following:
open 'mailto:[email protected]?subject=hey&body=how are you doing&attachment=/Users/myName/Desktop/testFile.rtf'
but when Outlook opens, there is no attachment. I have read that whether or not attachments are allowed with mailto links depends on the client. Does anyone know if Outlook 2011 allows for this type of attachment?
Specifying attachments is not part of the IETF
mailto:URI scheme, though individual clients may support it in one way or another.I'm not sure if this MSDN document applies to Outlook 2011 (OSX), but if it does, then what you are trying to do is probably not possible with mailto.
Alternatively, I assume that since you are using the
opencommand at the command-line, then you will be open to other command-line/shell-script methods of achieving this. One such way is to redirect an applescript in a bash here-document toosascript: