Discussion in 'E-mail Discussion' started by Tino-Designs, Aug 12, 2014.
I've had this problem for a while now and was not able to solve it.
The script gives a quick output and is supposed to send an email. the output is coming through fine (results are sent by cpanel via email).
however the email that the script is suppose to be sedning is never sent. I'm using mail() in php for this, it never works when calle as a cronob.
However when accessing the file directly or entering the same command into the command line mails are coming through fine!!
I also tried to switch from cgi hnadler to apache handler for php. Did not work.
I then figured out that /usr/local/bin/php /home/user/public_html/cron_test2.php would call the file using php cli even when called as cronjob.
Could anyone please give me a hand here?
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?
oh well your suggestion works fine.