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