Sendmail

  1. If sendmail isn't installed, install it:
    sudo apt-get install sendmail
  2. Configure /etc/hosts file, make sure the line looks like this:
    127.0.0.1    localhost    yourhostname
  3. Run Sendmail's config and answer Y to everything:
    sudo sendmailconfig
  4. Restart apache:
    sudo service apache2 restart