To send an email to a specific set of users, I am currently using mutt (command line based email client).
Below is the command that I have used in my shell script to send an email:
echo "Initiating bulk load now " | mutt -x -s "Bulk loading of records" abc@xyz.com -a 20100421_log.txt < /dev/null
When I am trying to send an email with the help of the above command through shell prompt, I am receiving the email.
But when I am trying to send an email with the help of the same command through shell script, I am receiving the email intermittently.(Let's say: If the script is executed at 8:30 PM, I am not receiving the email but when the same script runs again at 9:30 PM, I am receiving the email, that too is sporadic.)
What could be the reason of receiving emails intermittently?
The shell script is currently scheduled to run every hour through cron expression.
Linux distribution: Oracle Linux Server release 6.10
Job scheduler: cron