[eluser]Tom Vogt[/eluser]
[quote author="Colin Williams" date="1217826989"]Can you provide code that consistently throws this error in the latest version of CI? I certainly can't reproduce it.[/quote]
Code:
function invite() {
$loc = setlocale(LC_TIME, 'de_DE.UTF-8', 'de_DE@euro', 'de_DE', 'de', 'ge');
$data = array();
$data['subject']='Einladung zur Betriebsratssitzung';
// send the mail
$this->load->library('email');
$config['mailtype'] = 'html';
$this->email->initialize($config);
$this->email->from('[email protected]', 'OpenBR');
$this->email->subject($data['subject']);
$this->email->Subject($data['subject']);
// send personalize message to all members
$mems = $this->Members_model->getlist('Betriebsrat'); // get all full members
if ($this->Globals_model->check('agenda_personal_invite')) {
// non-personalized
$message = $this->load->view('email_einladung_allgemein', $data, true); // get the result instead of displaying it
$this->email->message($message);
$recipients = array();
foreach ($mems as $m) {
$recipients[]=$m->email;
}
$this->email->to($recipients);
$this->email->send(); // TODO: error handling
} else {
// personalized
// get next agenda/report day
$cur = $this->Agenda_model->get_current_agenda();
$next = $this->Agenda_model->get_agenda($cur);
$this->load->model('Projects_model');
foreach ($mems as $m) {
$data['name']=$m->first_name;
$data['projects']=$this->Projects_model->getoverview(false, $m->member_id, $next->day);
$message = $this->load->view('email_einladung_persoenlich', $data, true); // get the result instead of displaying it
$this->email->message($message);
$this->email->to($m->email);
$this->email->send(); // TODO: error handling
}
$recipients='(BR-Mitglieder)';
}