I am trying to send an email to customers with html form.
here is the controller file.
$email = 'jc2332@gmail.com';
$title = 'Introducing our new product!';
$msg = $this->load->view('admin/email_new_version', '', true);
$config['mailtype'] = 'html';
$this->load->library('email', $config);
$this->email->from('cs@example.com', 'company');
$this->email->to($email);
$this->email->subject($title);
$this->email->message($msg);
$this->email->send();
It looks fine for me, but html doesn’t work when I receive the mail.
Try to use this configuration and try to initialize the email library in a separated command:
This should work!