// send email method
function send_mail($email, $email_template, $link){
// assign the language data in array to $data
$data = $this->load_language();
$this->load->library('email');
$this->email->from('admin@123.cn', 'Ninger');
$this->email->to($email);
$this->email->bcc('admin@123.cn');
$subject = $data['mail_title'];
$data['link'] = $link;
$content = $this->load->view($email_template, $data, true);
$this->email->subject($subject);
$this->email->message($content);
$status = $this->email->send();
if ($status) {
return true;
}else{
return false;
}
//echo $this->email->print_debugger();
}