/etc/msmtprc


defaults
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
 
account default
host smtp.gmail.com
port 587 
auth on
user USERNAME@gmail.com
password PASSWORD
from USERNAME@gmail.com
logfile /var/log/msmtp.log


/etc/mail.rc


set sendmail=/usr/bin/msmtp