====== Email Setup ======
The password for gmail will be readable by root, so the best thing to do is to turn on two-step verification in Gmail.
Install Mail (mpack is for mail attachments, which I didn't install):
Configure Mail:
Edit and modify/add lines as necessary
No need to restart the mail server.
Test Email:
(username@domain.com is the destination address)
If you want to have Crontab email after each activity, set Crontab to use a specific email address:
====== Source Information ======
http://www.sbprojects.com/projects/raspb.../exim4.php
https://rpi.tnet.com/project/faqs/smtp
[url= https://rpi.tnet.com/project/faqs/smtp][/url]
The password for gmail will be readable by root, so the best thing to do is to turn on two-step verification in Gmail.
Install Mail (mpack is for mail attachments, which I didn't install):
Code:
sudo apt-get install ssmtp
sudo apt-get install mailutils
sudo apt-get install mpack
Configure Mail:
Edit and modify/add lines as necessary
Code:
sudo nano /etc/ssmtp/ssmtp.conf
Code:
mailhub=smtp.gmail.com:587
hostname=HOSTNAME
AuthUser=YOURADRRESS@gmail.com
AuthPass=PASSWORD
useSTARTTLS=YES
No need to restart the mail server.
Test Email:
Code:
echo "sample text" | mail -s "Subject" username@domain.com
(username@domain.com is the destination address)
If you want to have Crontab email after each activity, set Crontab to use a specific email address:
Code:
sudo crontab -e
MAILTO=username@gmail.com
====== Source Information ======
http://www.sbprojects.com/projects/raspb.../exim4.php
https://rpi.tnet.com/project/faqs/smtp
[url= https://rpi.tnet.com/project/faqs/smtp][/url]