To have the ability to send email from the command line, you will need to install the mailutils and postfix packages with the following commands.
apt-get install mailutils
apt-get install postfix
Now configure Postfix by running the following command.
There will be several options on the main screen. For me, I selected "Internet Site" and used all of the default settings. You may want to play around with other options such as "Internet with smarthost."
After configuring Postfix, test out the new configuration with the following command.
echo "test" | mail email@example.com