Unable to send mail using php mail() function.
--
The PHP mail() function is used to send emails from inside a script. If you are not able to send mails using php script, then check the php configuration file to make sure whether Suhosin is enabled or not. If Suhosin enabled on server, it restricts PHP scripts to send emails.
Suhosin is an open source patch for PHP. The goal behind Suhosin is to be a safety net that protects servers from insecure PHP coding practices.
Disable Suhosin
-----
Open the php.ini file and add the following code to the file:
[suhosin]
; Misc Options
suhosin.simulation = On
#On = Disabled, Off = Enabled
Save and quit the file. Restart apache.
-----