Install SSMTP packet:
sudo apt-get install ssmtp
open the configuration file:
sudo nano /etc/ssmtp/ssmtp.conf
Add new content as below (don’t forget change your_email and your_email_password, your_email_username):
Root=your_email@gmail.com Mailhub=smtp.gmail.com:465 RewriteDomain=gmail.com AuthUser=your_gmail_username # (before the @gmail.com part) AuthPass=your_gmail_password FromLineOverride=Yes UseTLS=Yes
At last, do a test:
echo testing|mail -s 'Test Mail' example@gmail.com
0 Comments