I have developed and actively used joplin-instant-mail for a while. Today I published it on Github:
The script that achieves this has just five lines of code, not counting whitespace, loading a vendor library and some line breaks in the final exec statement which are intended to make it easier to read.
Prerequisites include the Joplin terminal app, an MTA and PHP. As the php script is only 5 lines of code you could quickly rewrite it in the language of your choice if so desired.
This works, so I wanted to share it with everyone for whom it might be useful.
Also I'm sure it can be improved and would be interested in any feedback you might have:
Fore example, consider this statement at the end of the script (multiple lines for readability, but a single exec statement because of the backslashes):
~/.joplin-bin/bin/joplin use Inbox ;
~/.joplin-bin/bin/joplin mktodo '.$safeMessageSubject.' ;
~/.joplin-bin/bin/joplin set '.$safeMessageSubject.' body '.$safeMessageText.';
Is there any way to pass all the commands to the Joplin terminal app without calling it from the command line four times?
What would be the syntax for that?