In my PHP program, I am having trouble with the mail() function.
I can call it in my scripts anywhere up until this line:
$this->db_conn = mysqli_connect($this->db_host, $this->db_user, $this->db_pass);
If I put a call to the mail function immediately before it, mail() succeeds and returns true. If I put mail() right after this line, mail() fails and returns false.
Why could this be happening?
EDIT: The rest of my script continues as normal after the mail() call. This wasn't an issue until recently. Is there some PHP/Apache setting that might have been changed?
EDIT2: Didn't notice it before, but there is indeed a Warning showing up:
PHP Warning: mail() [<a href='function.mail'>function.mail</a>]: Could not execute mail delivery program '/usr/lib/sendmail -t -i'
What could mysqli_connect() be doing to prevent the mail program from functioning?
EDIT3: This is server is running Solaris with Apache web server. For now, I've switched PHPMailer over to using SMTP mode which is working fine. Still trying to figure out what is going wrong with mail() though.