I need to send an HTML email but in the message I add to load a HTML file from the view, but when I send email and receive it, but email is blank no text getting from the view file please suggest.
public function sendUserMail($mail) {
$data=true;
$lang = $this->input->post("lang");
$this->email->from('noreply@giftotravel.pk', 'Halalat');
$this->email->to($mail);
$this->email->subject('Halalat Newsletter Subscription');
$this->email->set_mailtype("html");
if ($lang == "en") {
$this->email->message = $this->load->view('email', $data, TRUE);
}
else
{
$this->email->message('<img src="http://fahad.myradio.pk/assests/images/ar/bg_ar3.jpg" />');
}
//$this->email->attach('/home/content/f/a/h/fahadghafoor/html/fahad/assests/images/en/bg_en2.jpg');//attachement testing done
$this->email->send();
echo $this->email->print_debugger();
}