CodeIgniter Forums
£ pound sign / symbol in email - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: £ pound sign / symbol in email (/showthread.php?tid=29791)



£ pound sign / symbol in email - El Forum - 04-21-2010

[eluser]nevsie[/eluser]
Hi, and stupid question time...

I am sending a simple plain text email using the mail class and having real trouble with the £ (pound sign)...

Code:
$this->email->clear(TRUE);
$config['charset'] = 'iso-8859-1';
$this->email->from('[email protected]', 'xxx');
$this->email->to($userdata['email']);
$this->email->subject('xxxxxxxxxxxxxxxx');
$this->email->message($this->load->view('xxx/xxx', $userdata, TRUE));
            
$this->email->send();

I have had a few different attempts and encodings, but so far no joy at all... Someone please tell me the obvious thing i am missing!

thanks, N


£ pound sign / symbol in email - El Forum - 04-21-2010

[eluser]n0xie[/eluser]
Did you try setting the config before sending the message:
Code:
$this->email->initialize($config);



£ pound sign / symbol in email - El Forum - 04-21-2010

[eluser]danmontgomery[/eluser]
Have you tried using £ instead?


£ pound sign / symbol in email - El Forum - 04-21-2010

[eluser]nevsie[/eluser]
thanks for the fresh set of eyes, i had stupidly taken the config set out when trying to problem solve with other methods. This resolved the problem.
As for the HTML version, this will not work as it is a plain text email.
cheers, N