For many users who already have Gmail accounts (or other email accounts), why not just use Gmail to deliver email for you if you simply want to send email from your machine? ssmtp is a very nice MTA to do this, securely.
sudo apt-get install ssmtp heirloom-mailx
edit your /etc/ssmtp/ssmtp.conf
Now run a simple test, send a email from your machine
echo "SSMTP" | mailx -s 'Hi' email@example.com
You are done!
Also, get the right permission to secure your password.
Now you can even use your editor such as emacs to send email.
- C-x m (compose a email)
- fill the email header and body
- C-c C-s (send email)
why not Sendmail or Postfix?
They are overkill. and good luck maintaining your own SMTP server :)
If you want your lovely Linux box to send email, you need to configure it as a mail server. That means you want to install/configure a SMTP server on your machine. Sendmail and Postfix are the powerful Mail Transfer Agent (MTA) to install for this purpose. The are ridiculously powerful to send and receive mail, with the cost that you might spend hours on configuration.