In my script I have a variable named $message. I want to send this message together with a jpeg using mpack.
One way that works:
echo "$message" > myText
mpack -s "test mail" -d myText myImage.jpg [email protected]
However, I would like to dispense with writing the file myText and directly pass the contents of $message to the -d parameter.
How can this be done?
BTW: My $message variable contains two sub-strings separated by a linefeed.