Welcome Guest, Not a member yet? Register   Sign In
send html format
#11

[eluser]density5[/eluser]
Quote:$this->load->library('email');
$config['mailtype'] = 'html';
$config['charset'] = 'utf-7'; //even utf-8 still the same output
$config['wordwrap'] = TRUE;
$this->email->initialize($config);

$message = '<b>tirso</b>. has commented on your music!<br /><a href="#">Click here to view your comment!</a>';
$this->email->from('Domesticity.com', $this->input->post('name'));
$this->email->to('[email protected]');
$this->email->cc('[email protected]');
$this->email->subject('contact');
$this->email->message($message);
$this->email->send();

your missing the Alt part of the html email i.e
Code:
$data_customer_email_text = $this->load->view('email_temp_typo_text', $data, TRUE);
$data_customer_email_html = $this->load->view('email_temp_typo_html', $data, TRUE);

// Send customer email

$this->email->from('[email protected]', 'Company Team');
$this->email->to($data_customer_email_address);
$this->email->bcc('[email protected]');
$this->email->subject('Email Subject');
$this->email->message($data_customer_email_html); //&lt;!-- main html part
$this->email->set_alt_message($data_customer_email_text); //&lt;!-- main text part
$this->email->send();

Also your Character set is wrong hence the =?utf-7?Q?contact?= try utf-8 or you might have to use a base 64 7bit Character set like

Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit


ps. Make sure you have no spaces at the end of your lines in the text part of your email.




Theme © iAndrew 2016 - Forum software by © MyBB