A simple way that may work for a lot of people who just need basic output for their scripts or daemons to announce an action is this:
echo "body or message" | mail -s "realtechtalk.com" email@example.com
If you want to send a text file as the body just do this instead:
mail -s "realtechtalk.com" firstname.lastname@example.org < /tmp/sometxtfile.txt
These are some very basic but simple and powerful examples that could assist in basic shell scripting such as taking the output of a command and e-mailing it based on a cronjob etc..
This is the only thing that worked for me on Centos:
mail -s "The Subject" -S email@example.com' firstname.lastname@example.org
examples, email, linux, unix, bash, shell, scriptinga, output, scripts, daemons, echo, quot, realtechtalk, user, domain, text, tmp, sometxtfile, txt, assist, scripting, mailing, cronjob, etc, resource,