sending email with codeigniter

Posted by Maru on Stack Overflow See other posts from Stack Overflow or by Maru
Published on 2013-06-26T01:23:51Z Indexed on 2013/06/26 4:21 UTC
Read the original article Hit count: 305

Filed under:
|

I have this MODEL and I get the email which I want to send

class Cliente_Model extends CI_Model{

public function getInfo($id){

    $this->db->select('*');
    $this->db->from('pendientes');

    $query = $this->db->get();        

    if($query->num_rows() > 0)
    {
        foreach ($query->result_array() as $row)
        {
            return $row['email'];
        }
    }
    else
    {
        return FALSE;
    }
}
}

CONTROLLER

$this->load->model('cliente_model', 'client');


$clientInfo = $this->client->getInfo($id);      

$this->email->from('[email protected]', 'Demo'); 
$this->email->to($clientInfo);  

$this->email->subject('Email Test'); 
$this->email->message('your user is '.$clientInfo.' and your password is '.$clave);   

$this->email->send(); 

and I need some help here, 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!

© Stack Overflow or respective owner

Related posts about codeigniter

Related posts about email