Hi everyone!
I have this model and I get the email which I want to send
class People_Model extends CI_Model{ public function getInfo($id){ $this->db->select('*'); $this->db->from('people'); $query = $this->db->get(); if($query->num_rows() > 0) { foreach ($query->result_array() as $row) { return $row['email']; } } else { return FALSE; } } }
and in my controller
$this->load->model('people_model', 'people'); $clientInfo = $this->people->getInfo($id); $this->email->from('myemail@server.com', 'My Title'); $this->email->to($clientInfo); $this->email->subject('My Subject'); $this->email->message('Your User is '.$clientInfo.' and your Password is '.$pass); // I can get the email but $pass of course can't get any value in this case. $this->email->send();
I need some help here because I can get the email and it can send it perfectly but in the message I need to send the password also and I don't know how I can get it from the model.
thanks in advance!