In this article I demonstrate how to send emails from the terminal of an Ubuntu machine. It’s assumed you have a Mail Transfer Agent like Exim 4 or Postfix set up.
echo "<message goes here>" | mail \ -s "<subject goes here>" <to email address>
Sources
How to send email from the Linux command line – Simple Help. http://www.simplehelp.net/2008/12/01/how-to-send-email-from-the-linux-command-line/