I am able to send an email using ssmtp using the following command line :
ssmtp my@email.com < ./textfile.txt
...but I want to send a message from a cron task, and on the fly, without creating the file.
I tried
ssmtp my@email.com < echo "Text body here..."
but that doesn't work. How do I go about getting the above to work?
I also tried
echo "Text message..." | ssmtp my@email.com
but to no avail.