# setup msmtp for sending out email # as an alternative to sendmail # i prefer this because it is easier to install and configure than sendmail # especially when using Gmail smtp servers sudo -i apt-get install msmtp ln -s /usr/bin/msmtp /usr/sbin/sendmail touch /var/log/msmtprc && chmod 666 /var/log/msmtprc vim /etc/msmtprc # config options: http://msmtp.sourceforge.net/doc/msmtp.html#A-user-configuration-file defaults logfile /tmp/msmtp.log # gmail account account gmail auth on host smtp.gmail.com port 587 user your.account@gmail.com password yourpassword from your.account@gmail.com tls on tls_trust_file /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt # set default account to use account default : gmail :wq # now test msmtp sendmail me@example.com # use your own email address Subject: testing hello # Ctrl+D to send # check email to ensure it arrived