Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- php mail() function does nothing
September 19, 2005, 2:07 pm
rate this thread
We've got FreeBSD 5.3, with Sendmail running. All we want to do is to
get sendmail to send emails to another server for actual outbound
email. We've got a very basic php script which utilizes the mail()
function, but for some reason, sendmail is never getting the command
So, we can successfully send email using sendmail from the command
prompt, but when it comes to using the PHP mail() function, nothing
happens. Not even an error message from PHP.
We have in our php.ini a direct path all the way to sendmail
configured. I'm at a loss as to why PHP mail() isn't even spitting
back an error. The maillog shows nothing from PHP.
Are there any variables, extensions that need to be compiled, etc to
make mail() work?
Re: php mail() function does nothing
Did you set sendmail_from? That may be it as well. Also perform a
trace of sendmail when PHP goes to send an email.
Also note from the manual:
" For the Mail functions to be available, PHP must have access to the
sendmail binary on your system during compile time. If you use another
mail program, such as qmail or postfix, be sure to use the appropriate
sendmail wrappers that come with them. ... Also, the user that compiled
PHP must have permission to access the sendmail binary."
Try recompiling and making sure that the user you compiled under has
access to sendmail.
Zend Certified Engineer