I have installed ssmtp mailutils and can send email from my Pi (running Raspbian - a Debian 9.4 variant) I configured /etc/ssmtp/ssmtp.conf and can send email using ssmtp and Gmail as SMTP server.
In order to make this work I has to configure the Gmail account to allow Access for less secure apps.
My question is it possible to configure ssmtp to use normal Gmail security (OAuth?), and if so how?
# # Config file for sSMTP sendmail # # The person who gets all mail for userids < 1000 # Make this empty to disable rewriting. root=XXXi@gmail.com # The place where the mail goes. The actual machine name is required no # MX records are consulted. Commonly mailhosts are named mail.domain.com mailhub=smtp.gmail.com:587 AuthUser=XXX@gmail.com AuthPass=… AuthMethod=LOGIN UseTLS=YES UseSTARTTLS=YES # Where will the mail seem to come from? rewriteDomain=gmail.com # The full hostname hostname=XXX # Are users allowed to set their own From: address? # YES - Allow the user to specify their own From: address # NO - Use the system generated From: address FromLineOverride=YES