Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter sends three mails instead of one
#1

Hello,


I am using CodeIgniter 3.02 for sending a newsletter. I'm just sending 1 mail to one recipient, but I receive the same mail 3 times.

I don't use a loop. I don't understand why three mails were sent.

My code :

Code:
function sendMailProspects(){
   date_default_timezone_set ("Europe/Berlin");

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

   $config['protocol'] = 'mail';
   $config['charset'] = 'utf-8';
   $config['wordwrap'] = TRUE;
   $config['mailtype'] = 'html';

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

   $this->email->to('[email protected]');
   $this->email->from('[email protected]','John DOE');
   $this->email->reply_to('[email protected]', 'John DOE');
   $this->email->subject('Mysubject');
   $this->email->message('<h1>HTML CODE</h1><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Provident.</p>');
   $this->email->set_alt_message('texte');
   $this->email->send();
}

I just execute this method directly in the url, no loop, nothing special.

I've tested this code on localhost and on an shared hosting with the same result: I receive three mails.

What could I be doing wrong?

Thank's

Patrice
Reply


Messages In This Thread
CodeIgniter sends three mails instead of one - by patguitar - 10-28-2015, 09:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB