CodeIgniter Forums
Setting Email Recipient Name - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Setting Email Recipient Name (/showthread.php?tid=45815)



Setting Email Recipient Name - El Forum - 10-06-2011

[eluser]Unknown[/eluser]
Hi everyone,

I'm trying send email and wish to have the "friendly" recipient name being included in the email. All I get is just the email address and not the recipient's name.

Code:
$this->email->to('John Smith <[email protected]>');   // emails displays as [email protected]
$this->email->to('"John Smith" <[email protected]>'); // emails displays as [email protected]
$this->email->to('<[email protected]>','John Smith'); // emails displays as [email protected]

Does anyone know why? I've seen references on the web to a second parameter to the "to" function for passing in a friendly name. Having a look at the CI source/documentation, there doesn't appear to be any such parameter?