$ echo "hello world" | mail -s "a subject" someone@somewhere.com
Basically there's a program to accomplish that, called "mail". The subject of the email can be specified with a -s and a list of address with -t. You can write the text on your own with the echo command:
echo "This will go into the body of the mail." | mail -s "Hello world" you@youremail.com
or get it from other files too:
mail -s "Hello world" you@youremailid.com < /home/calvin/application.log
mail doesn't support the sending of attachments, but Mutt does:
echo "Sending an attachment." | mutt -a file.zip -s "attachment" -- target@email.com