I have written a script which runs a simple program in the background, logs the output and emails me when the job is done. It works fine except for the fact I am not recieving the email. I have tried a yahoo mail, a gmail but I never get the email. I have been told that:
1) I can try the
tee command, but i have never used this
2) Some email services wont accept email when the sender is not specified
I am using Fedora. This is the code I have for logging the results of the background program and then sending the email:
(nice -n 10 nohup ./$user_cmd >$log_stdout 2>$log_stderr </dev/null ; echo $body `date` | mutt -s "$subj" $recipient) &
Can someone please help me get this working properly? Why am I not recieving the email?
If this is not clear let me know and i will post the entire script. Basically the objective is to get the email sent using the