I have a script which sends emails. It works perfectly when run manually but I doesn't work when run with crontab:
#!/bin/bash
cat $HOME/myfolder/mailbody | /bin/mailx -v -s "mymail" -a file.txt xxx.yyy@zzz.com > $HOME/myfolder/script.log
When run with crontab, nothing is written in "$HOME/myfolder/script.log". I can't understand why with crontab the command to send the email is not run.