$ sudo apt-get install msmtp openssl ca-certificates
$ vim ~/.msmtprc
account default
host smtp.gmail.com
port 587
from GMAIL_ACCOUNT
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth on
user GMAIL_ACCOUNT
password GMAIL_PASSWORD
logfile ~/.msmtp
$ chmod 600 ~/.msmtp
Prepare a file starting wit:
to: DESTINATION
from: SENDER
subject: SUBJECT
And finally:
msmtp -t < YOUR_FILE
No comments:
Post a Comment