...
echo "This is a test" | sendmail xxx@yahoo.com
Configure
...
an App Password on Yahoo
You may need to generate an app password on Yahoo in order to send email.
From the Yahoo Mail UI, click your Name and then click on Account Info.
From here, select Account Security and click on Manage App Passwords.
Use the generated password in your email settings.
Configure Cron Jobs
Because cron uses a minimal shell, we need to update it's path. Update Cron to mail to a particular user
crontab -e
Set the path for cron and MAILTO at the beginning of the file.
Setting a MAILTO="" will disable cron from sending emails for jobs which generate output.
Code Block |
---|
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin MAILTO="" |
...