This was suprisingly difficult for me, so I'm making this quick guide so I have it handy in the future.
- Set up mutt using this guide
- Create your bash script that will be sending emails using mutt.
- When creating your bash script, add the following line to your mutt command:
Where /home/user/ is the path to your own configured .muttrc file in your home folder.
mutt -F /home/user/.muttrc ...
- Add your crontab:
Using the following syntax:
sudo crontab -e
* * * * * /bin/bash /path/to/your/bash/script.bash >> /desired/path/to/logs/crontab_log.log 2>&1
- Reboot your machine.
- Check your crontab_log.log file to ensure everything went alright.