Jump to content

[SOLVED] mail() Inside a Cron Job


chigley

Recommended Posts

Hey all.

 

I've been having some problems when using the mail() in a PHP script being executed with a Cron job.

 

When I type the filename into my browser, I receive the email. Yet for some reason the email is not sent when the file is executed by the Cron demon.

 

Any suggestions?

 

Cheers

Link to comment
https://forums.phpfreaks.com/topic/95237-solved-mail-inside-a-cron-job/
Share on other sites

OK well I decided to try doing it the way it's worked in the past on another project (I didn't realise I was doing it differently to last time):

 

/usr/local/bin/php /path/to/file.php

 

And now I get errors along these lines:

 

Warning: include(../includes/mysql.php): failed to open stream: No such file or directory in /home/zignet/public_html/sitefunctions/update.php on line 3

Warning: include(): Failed opening '../includes/mysql.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/zignet/public_html/sitefunctions/update.php on line 3

 

Advice appreciated :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.