#1784 and some add-ons

#1784 plus some UX/polish, and support for writing message body in command line