Sending eMail from Terminal

Sending mail can be accomplished by a number of programs on a linux system. Here are a few examples provided you have already setup postfix relay services on your server. Then you have to configure it, and once you have done that, you can send email like this:

 echo "My message" | mail -s subject

You can use an echo with a pipe to avoid prompts or confirmation.

echo "This is the body" | mail -s "This is the subject"