I am able to send an email using ssmtp using the following command line :
ssmtp email@example.com < ./textfile.txt
...but I want to send a message from a cron task, and on the fly, without creating the file.
ssmtp firstname.lastname@example.org < 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 email@example.com
but to no avail.