I have a script that will run fine when run manually but when i try to run via
cron, I get this in my inbox...
sh: sendmail: not found
Could not instantiate mail function.
Message could not be sent.
Mailer Error: Could not instantiate mail
I have made sure the from address is valid as suggested on other sites.
It is what it says it is: sendmail wasn't found. Remember that, when run from
cron, the working location is different, so check the paths, especially that
to sendmail (be sure to use the full path).
Where am I looking for the path to sendmail? In the class.phpmailer... ?
Not sure if this makes a difference... I am running the cron as same user when
I run manually. I also have postfix installed in addition to sendmail it
Check this page: http://phpmailer.worxware.com/index.php?pg=properties , about half of the page:
$Sendmail public /usr/sbin/sendmail Sets the path of the sendmail program.
Maybe your sendmail isn't at /usr/sbin/sendmail?
my sendmail is /usr/sbin/sendmail
However, it was a PATH issue as it happens. Adding the path to sendmail to the
cron file execution of the script has corrected this problem.
Thanks for your input.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.