sending email using templates in codeigniter -


i have send weekly reports users. using email template view. code in controller

function sendweeklymail(){     if(!$this->session->userdata('some'))         redirect('admin/admin','refresh');    $data=$this->admin_model->getuserdata();    foreach($data $u){         $this->email->clear();          $this->email->to($u->email);         $this->email->from('your@example.com');         $this->email->subject('here info '.$name);         $this->email->message('email/report',$data,'true');         $this->email->send();        }    } } 

my question how send data can show user data in body of message. codeigniter takes data $data['user_data']

hi have following step send email using templates

$data['name'] = "mike";  $data['email'] = 'mike@hissite.com'; $data['message_body'] = "any message body want send";  $message = $this->load->view('email/report',$data,true); // return html data message $this->email->message($message); 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -