http://tombuntu.com/index.php/2008/10/21/sending-email-from-your-system-with-ssmtp/
sudo apt-get install ssmtp
sudo nano /etc/ssmtp/ssmtp.conf
root=myemailaddress@gmail.com
mailhub=smtp.gmail.com:587
AuthUser=mygmailusername
AuthPass=mypassword
UseSTARTTLS=YES
If you use your google account then you will have to add an app password instead of your user password.
ssmtp myemailaddress@gmail.com < msg.txt
msg.txt is a simple text using the proper formatting for sSMTP:
To: myemailaddress@gmail.com
From: myemailaddress@gmail.com
Subject: alert
The server is down!
Ctrl+D
or
printf "To: myemailaddress@gmail.com\nFrom: myemailaddress@gmail.com\nSubject: New IP address\n\n\nMessage\n" | ssmtp myemailaddress@gmail.com
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.