linux - how to send a email with cron bash? -
hi far not send email cron, let me explain current problem :
i have next bash script :
# when script starts send email notification echo "subject: work completed > /tmp/msg echo "from: admin@automated" >> /tmp/msg echo >> /tmp/msg echo "the work has finished" >> /tmp/msg echo "some variables here ... " >> /tmp/msg sendmail mypersonalemail@gmail.com < /tmp/msg ## here script execute things ## , when finished send email notify this, , other email has more variables
so when executed script manually works, mean send mail email account without issues, try automated task send automatically mail time cron, have comment cron works fine other scripts particularly looks cron not able send email , dont know why, investigating apparently specific problem :(. not needs cron automated task, other utility know :)
my os ubuntu 14.04.03 lts
other question here, know why "sendmail" not works in ubuntu 15.10 or how configure it
cheers
Comments
Post a Comment