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" firstname.lastname@example.org
If you want to send a text file as the body just do this instead:
mail -s "realtechtalk.com" email@example.com < /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..
An excellent resource on this is also here.
This is the only thing that worked for me on Centos:
mail -s "The Subject" -S firstname.lastname@example.org' email@example.com
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,