Skip to main content

php script called by cronjob is not sending mail

Comments

4 comments

  • cPanelMichael
    Hello :) Have you verified the "crond" service is running on this system? You can check with a command such as: service crond status
    If it's not running you can restart it via: service crond start
    Thank you.
    0
  • Tino-Designs
    [quote="cPanelMichael, post: 1707002">Hello :) Have you verified the "crond" service is running on this system? You can check with a command such as: service crond status
    If it's not running you can restart it via: service crond start
    Thank you.
    Hi yes I already found that suggestion and checked it before. it is working fine. crons in itself are working fine.. It's just email is not being sent. Well I now figured out that running "wget http://domain.com/urltoscript.php" is seinding mails fine and working but I'm not sure if that is someting we can use without needing to look out for anything. Are there may be security issues involved? Is the content saved on the server and if so where and does it need to be removed after time?
    0
  • cPanelMichael
    It's interesting that using "/usr/local/bin/php -q" in the cron job fails, and "wget" completes successfully. There are not really any additional security issues with using "wget" in this particular instance. You can dump the data to /dev/null if you don't want the file downloaded. EX: wget -O/dev/null http://domain
    Thank you.
    0
  • Tino-Designs
    [quote="cPanelMichael, post: 1707562">It's interesting that using "/usr/local/bin/php -q" in the cron job fails, and "wget" completes successfully. There are not really any additional security issues with using "wget" in this particular instance. You can dump the data to /dev/null if you don't want the file downloaded. EX: wget -O/dev/null http://domain
    Thank you.
    Thank you. Well againg only email sending fails not the cron php command itself... oh well your suggestion works fine. Thanks
    0

Please sign in to leave a comment.