Writing Emails via Commandline

First you have to setup ssmtp:
#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=my@email.com

# The place where the mail goes. The actual machine name is required no 
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=mail.variomedia.de:12345
UseTLS=YES
AuthUser=kkr
AuthPass=@#$@#$@#$@#$@#$
AuthMethod=LOGIN

# Where will the mail seem to come from?
#rewriteDomain=

# The full hostname
hostname=host137.local

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
#FromLineOverride=YES
Then you can send mails with 'mail':
echo "content" | mail -v -s "the email title" some@email.com