CodeIgniter Forums
HTML email strips CSS - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: HTML email strips CSS (/thread-52633.html)

HTML email strips CSS - El Forum - 06-19-2012

I'm trying to send an html email with code igniter's email class and have downloaded a simple mailchimp template for this. Sending it from mailchimp arrives just fine in gmail, but when sending the same from code igniter, it strips all the CSS.

I'm sending as follows:
$config['charset'] = 'utf-8';
     $config['mailtype'] = "html";
     $config['send_multipart'] = false;

$message = $this->load->view("user/email", $emaildata, true);

any ideas are welcome! Thanks for helping out!

The email arrives, but with CSS being gone completely in gmail.
PS: loading the same "user/email" view in the browser works perfect.

HTML email strips CSS - El Forum - 06-19-2012

sorry, thought I figured it out, but didn't

HTML email strips CSS - El Forum - 06-19-2012

It's best to use inline-css for html-based email. Most mail readers won't include external stylesheets, etc. Has nothing to do with CI. I'm betting mailchimp used inline css as most of them do.