Based on the information of mail function in php, it says that a setting of sendmail_path has to be set in php.ini. I tried to search for this php.ini file. I could not find it. Not sure it is in a difference file or something else I don't know.

I tried to call mail function in a test php file in my local Sites. Nothing happened. I guess it is mail configuration issue in my local php. How should this to be set? Any detail information for Mac?

I am using Snow Leopard. The phpinfo() displays the version is PHP Version 5.3.0. I cannot see any mail configuration from the result. Not sure if there is way to see the mail configuration from a php page?

2 Answers 2


This page tells where the php.ini file should be located.

If you load phpinfo.php in your browser it should show the current setting of sendmail_path.

You will need to have a working mail transport agent (e.g. sendmail).


Actually, I don't have php.ini file in my local iMac. From the phpinfo(), what I found is that the default mail configuration settings are:

SMTP = localhost
sendmail_path = /usr/sbin/sendmail -t -i
smtp_port = 25
sendmail_from = no value

And on the top of phpinfo() result, what I found about configuration is:

Configuration File (php.ini) Path: /etc

in /etc I found php.ini.default file and another one php.ini.default-5.2-previous. If I need to change settings of php config, I have to make a copy of the default file as php.ini in /etc and make changes as sudo.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .