CodeIgniter unable to send emails using PHP mail ()


I'm trying to send an e-mail with Codeigniter like this:


$this->email->from("[email protected]");
$this->email->reply_to("[email protected]");
$this->email->to("[email protected]");
$this->email->subject("Test mail");
$this->email->message("Email body");
$this->email->set_alt_message("Email body txt");

and I got this on the email debugger: Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.

If I do e simple PHP mail() function with the same addresses, it works but when I use CodeIgniter it gives me the error. So why would it work with simple mail() but not with CodeIgniter ? Any ideas ?


Do you have an email.php file in your config folder? Maybe there's a problem with your configuration in there.