Code Igniter email protocols and rendering HTML emails?

Posted by John on Stack Overflow See other posts from Stack Overflow or by John
Published on 2010-03-13T21:36:32Z Indexed on 2010/03/17 5:51 UTC
Read the original article Hit count: 514

Filed under:
|

I have a website built in code igniter that emails users. I use CI's email class from the controller to do mail out, but I discovered that if I use the "mail" protocol, some (not all) users see un-rendered html emails with the html mark up viewable, while others do not. But if I use the "sendmail" protocol, all users get rendered html emails.

So if I did this

$config['protocol'] = 'mail'; 
// add a few more config entries
$this->email->initialize($config);

Not everyone sees html emails

If I did this

$config['protocol'] = 'sendmail'; 
// add a few more config entries
$this->email->initialize($config); 

Everyone sees html emails

Why does the protocol matter? Are the email headers different between the two?

© Stack Overflow or respective owner

Related posts about codeigniter

Related posts about email