Msmtp
From James's Wiki
sudo nano /etc/msmtprc
After you've on nano edit's interface you can add this configuration file and save the configuration
account default
host smtp.gmail.com
port 587
logfile /tmp/msmtp.log
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth login
user username@gmail.com
password thepassword
from First Last Name
account account2
echo -e "Subject: Test Mail\r\n\r\nThis is a test mail" |msmtp --debug --from=default -t username@gmail.com