[eluser]doMynation[/eluser]
Hello,
This is my code representing two ways of sending HTML content via e-mail.
Both ways work fine except that in the way #2, the accented characters aren't displayed.
I've tried to change the caracters encoding of the view file using Notepad++, without success.
My guess is that the Loader's view() function neglects accented characters or something.
Code:
// Way #1 (works with accented characters)
$body = '
<a href="'.site_url('service/serviceRequest').'">Service à la clientèle...</a>
<div style="background-color:#CCCCCC">Accènt aigüe éllo test</div>';
// Way #2 (accented characters aren't displayed)
$data['firstName'] = 'Dominique';
$data['lastName'] = 'Sarrazin';
$body = $this->load->view('pavilion/email', $data, true); // loading the email body
$this->email->charset = 'iso-8859-1'; // setting the charset to latin-1 (allowing accented characters)
$this->email->mailtype = 'html';
$this->email->to($cusEmail);
$this->email->from(EMAIL_NOREPLY, SERVICE_NAME_FROM);
$this->email->subject('Enregistrement de produit - Confirmation');
$this->email->message($body); // sending the HTML body
return $this->email->send();
Does anyone have the same problem ?
Thank you !