If you don't need a full blown mail server, and use Gmail for almost everything, this guide is for you. With SSMPT you can have a quick and easy way to get automated mail off your machine and to a mail hub.
Installation and Setup
To install SSMTP, you can just use Pacman:
pacman -S ssmtp
To configure SSMTP, you will have to edit two files, /etc/ssmtp/ssmtp.conf and /etc/ssmtp/revaliases.
In /etc/ssmpt/ssmtp.conf enter:
firstname.lastname@example.org mailhub=smtp.gmail.com:587 rewriteDomain= email@example.com UseSTARTTLS=YES AuthUser=youraccount AuthPass=yourpasword FromLineOverride=YES
Replacing youraccount with your Google username.
In /etc/ssmpt/revaliases enter:
And this is it. If you want to test it, you can simply issue at the terminal prompt:
echo test | mail -s "testing ssmtp setup" USERNAME@SOMEDOMAIN.COM
Where USERNAME@SOMEDOMAIN is an address that you can check, or somebody is willing to check for you.