Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Sending html view in email with codeigniter -->
- #email_marketing #email_template
- $config = Array(
- 'protocol' => 'sendmail',
- 'smtp_host' => 'Your host name',
- 'smtp_port' => 587,
- 'smtp_user' => 'your email',
- 'smtp_pass' => 'email's password',
- 'smtp_timeout' => '4',
- 'mailtype' => 'html',
- 'charset' => 'iso-8859-1'
- );
- $this->load->library('email', $config);
- $this->email->set_newline("\r\n");
- $this->email->from('your email', 'Title');
- $data = array(
- 'name'=> 'value'
- );
- $this->email->to('recevier email address');
- $this->email->subject('subject');
- $this->email->set_header('MIME-Version', '1.0; charset=utf-8');
- $this->email->set_header('Content-type', 'text/html');
- $body = $this->load->view('folder/file',$data,TRUE);
- $this->email->message($body);
- $this->email->send();
Add Comment
Please, Sign In to add comment