Skip to content

Instantly share code, notes, and snippets.

@SimonLammer
Last active October 1, 2021 12:07
Show Gist options
  • Save SimonLammer/d4c3be4613bbc6ff5798bae73ccd3627 to your computer and use it in GitHub Desktop.
Save SimonLammer/d4c3be4613bbc6ff5798bae73ccd3627 to your computer and use it in GitHub Desktop.
Configuration of msmtp to send emails via gmail
# Resources this configurations is inspired by
# https://techrapiduk.blogspot.com/2017/04/send-email-on-raspberry-pi-with-msmtp.html
# https://www.raspberrypi.org/forums/viewtopic.php?t=244147
# Fix log permissions
# https://askubuntu.com/a/1269230/776650
account default
host smtp.gmail.com
port 465
logfile /var/log/msmtp
tls on
tls_starttls off
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth login
user MYACCOUNT@gmail.com
password MYPASSWORD
from FIRST LAST NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment