ビューからロードされた電子メールの内容を使用して、アプリケーションからユーザーに電子メールを送信したい 。これは私が今まで試したコードです:
$toemail = "user@email.id";
$subject = "Mail Subject is here";
$mesg = $this->load->view('template/email');
$this->load->library('email');
$config['charset'] = 'utf-8';
$config['wordwrap'] = TRUE;
$config['mailtype'] = 'html';
$this->email->initialize($config);
$this->email->to($toemail);
$this->email->from($fromemail, "Title");
$this->email->subject($subject);
$this->email->message($mesg);
$mail = $this->email->send();