Welcome Guest, Not a member yet? Register   Sign In
Email library : mail() function issue
#1

[eluser]metalking[/eluser]
Hi everybody!

I'm just trying to build a mail module for my application (some kind of newsletter), and I'm having some problems with the Email library.

When I try to send a mail using the method described in the user guide, I get a PHP warning, saying that in libraries/Email.php, at line 1232, the mail() function receives a wrong number of parameters.

My CI code :

Code:
$this->load->library('email');

$emailconfig['protocol'] = 'smtp';
$emailconfig['smtp_host'] = 'smtp.gmail.com';
$emailconfig['smtp_user'] = 'username';
$emailconfig['smtp_pass'] = 'password';
$emailconfig['smtp_port'] = '465';

$this->email->initialize($emailconfig);

$this->emails = $this->get_emails($this->validation->destinataires);
foreach($this->emails as $email)
{
$this->email->from('[email protected]', 'The Polygon\'s Battle');
$this->email->reply_to('[email protected]', 'metalking');
$this->email->to($email['email']);

$this->email->subject($this->validation->sujet);
$this->email->message($this->validation->message);

if($this->email->send())
{}
else
$this->mailerror = 1;
                    
$this->email->clear();
}

Don't care about vars names and so on, the only error I get (at the moment) is this PHP error, which says CI sends a wrong number of parameters to the mail() function.

Have you any idea of what the problem is?


Thanks ! Wink


Messages In This Thread
Email library : mail() function issue - by El Forum - 06-27-2007, 09:21 AM
Email library : mail() function issue - by El Forum - 06-27-2007, 10:13 AM
Email library : mail() function issue - by El Forum - 06-27-2007, 10:17 AM
Email library : mail() function issue - by El Forum - 06-27-2007, 10:34 AM
Email library : mail() function issue - by El Forum - 06-27-2007, 10:56 AM
Email library : mail() function issue - by El Forum - 06-27-2007, 11:04 AM
Email library : mail() function issue - by El Forum - 06-27-2007, 11:58 AM
Email library : mail() function issue - by El Forum - 06-27-2007, 12:22 PM
Email library : mail() function issue - by El Forum - 06-27-2007, 01:20 PM
Email library : mail() function issue - by El Forum - 06-27-2007, 01:32 PM
Email library : mail() function issue - by El Forum - 06-27-2007, 01:34 PM
Email library : mail() function issue - by El Forum - 06-27-2007, 01:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB