Code Igniter email protocols and rendering HTML emails?
- by John
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?