PHP mail error. Not able to send mail using script – Cpanel server.

April 15, 2008 on 4:44 pm | In Apache, Cpanel, PHP | No Comments

Follow the steps below to sort out the problem.

Check whether mail server is able to send mail.

Next is to
Check in WHM tweak setting whether nobody is allowed to send mail.

================
WHM > Tweak settings > Mail > Prevent “nobody” from sending out this mail.
disable it.
================

If it is disabled. Next is to repair Exim.

Backup the /etc/exim.conf and then repair exim

================
/scripts/eximup –force
================

Most probably the issue should be fixed by now.
If not, the next step of troubleshooting is

Check the php.ini file.

locate your php.ini file.

================
php -i | grep php.ini
================

you will get the location from above command.
Open the file and find the directive “disable_functions=”

Check whether mail() is included. if there, remove it and save. Then go for an Apache restart

However, if all the above are OK and still not working.

Check whether mod_security is installed.
If installed, disable it and then check.

All the above are OK.
Recompile PHP + Apache

If that too doesn’t work…………………….
Upgrade PHP and then downgrade it.

It should be fixed now.
Other wise you have to go for Cpanel support.

No Comments yet »

RSS feed for comments on this post. TrackBack URI

Leave a comment