Msmtp

From James's Wiki
Revision as of 20:08, 30 January 2021 by Ractive (talk | contribs) (Created page with "sudo nano /etc/msmtprc<br> After you've on nano edit's interface you can add this configuration file and save the configuration<br> account default<br> host smtp.gmail.com<b...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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