CodeIgniter Forums
Unable to send email using PHP mail(). - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Unable to send email using PHP mail(). (/thread-22784.html)



Unable to send email using PHP mail(). - El Forum - 09-20-2009

[eluser]emuexplosion[/eluser]
Code:
Unable to send email using PHP mail().  Your server might not be configured to send mail using this method.

What I don't understand from this print_debugger() error is that my server uses mail() just fine. If I test a simple mail using..

Code:
<?php
$mail = mail('[email protected]', 'subject', 'msg');
?>

.. it sends just fine. I'm using the same code to send an e-mail copied from another CI website I have.. the only thing that differs is the server. What about the server could cause this? Both are cPanel, one is a VPS (e-mail works), one is a dedicated server (e-mail doesn't work).. but both are setup within cPanel the same.

I'm stuck.


Unable to send email using PHP mail(). - El Forum - 09-20-2009

[eluser]emuexplosion[/eluser]
I figured it out myself.

Turned out to be.. suhosin.mail.protect was set to 2, and I just turned it completely off.