Views:
37,851β
Votes: 6β
Tags:
command-line
cron
email
rm
Link:
π See Original Answer on Ask Ubuntu β§ π
URL:
https://askubuntu.com/q/1021764
Title:
How do I set Cron to send emails?
ID:
/2018/04/04/How-do-I-set-Cron-to-send-emails_
Created:
April 4, 2018
Edited: August 5, 2018
Upload:
September 15, 2024
Layout: post
TOC:
false
Navigation: false
Copy to clipboard: false
I used a pretty simple method to get cron
to send emails: Backup Linux configuration, scripts and documents to Gmail.
Simplest way to automate sending email
From Send email alerts using ssmtp we find the simplest way of sending email automated from terminal or script. The installation steps are straight forward:
sudo apt install ssmtp
sudo nano /etc/ssmtp/ssmtp.conf
# Change "MyEmailAddress" and "MyPassword" to your own.
There is one step not mentioned; Google will send you an email confirming you want to allow a βless secureβ application to send mail with your account:
There is an annoyance of getting too much mail. For example every time you mistype your sudo
password you will get an email: Stop emailing me bad sudo password attempts